SYMBOL INDEX (235 symbols across 21 files) FILE: dataset_readers/dataset_util/spider_utils.py class TableColumn (line 16) | class TableColumn: method __init__ (line 17) | def __init__(self, class Table (line 30) | class Table: method __init__ (line 31) | def __init__(self, function read_dataset_schema (line 40) | def read_dataset_schema(schema_path: str) -> Dict[str, List[Table]]: function read_dataset_values (line 75) | def read_dataset_values(db_id: str, dataset_path: str, tables: List[str]): function ent_key_to_name (line 99) | def ent_key_to_name(key): function fix_number_value (line 110) | def fix_number_value(ex: JsonDict): function disambiguate_items (line 159) | def disambiguate_items(db_id: str, query_toks: List[str], tables_file: s... FILE: dataset_readers/fields/knowledge_graph_field.py class SpiderKnowledgeGraphField (line 12) | class SpiderKnowledgeGraphField(KnowledgeGraphField): method __init__ (line 17) | def __init__(self, method _compute_related_linking_features (line 48) | def _compute_related_linking_features(self, FILE: dataset_readers/spider.py class SpiderDatasetReader (line 25) | class SpiderDatasetReader(DatasetReader): method __init__ (line 26) | def __init__(self, method _read (line 53) | def _read(self, file_path: str): method text_to_instance (line 121) | def text_to_instance(self, FILE: models/semantic_parsing/spider_parser.py class SpiderParser (line 37) | class SpiderParser(Model): method __init__ (line 38) | def __init__(self, method forward (line 158) | def forward(self, # type: ignore method _get_initial_state (line 216) | def _get_initial_state(self, method _get_neighbor_indices (line 376) | def _get_neighbor_indices(worlds: List[SpiderWorld], method _get_schema_graph_encoding (line 428) | def _get_schema_graph_encoding(self, method _get_graph_adj_lists (line 459) | def _get_graph_adj_lists(device, world, global_entity_id, global_node=... method _create_grammar_state (line 506) | def _create_grammar_state(self, method is_nonterminal (line 588) | def is_nonterminal(token: str): method _get_linking_probabilities (line 593) | def _get_linking_probabilities(self, method _action_history_match (line 676) | def _action_history_match(predicted: List[int], targets: torch.LongTen... method _query_difficulty (line 687) | def _query_difficulty(targets: torch.LongTensor, action_mapping, batch... method get_metrics (line 693) | def get_metrics(self, reset: bool = False) -> Dict[str, float]: method _get_type_vector (line 704) | def _get_type_vector(worlds: List[SpiderWorld], method _compute_validation_outputs (line 757) | def _compute_validation_outputs(self, FILE: modules/gated_graph_conv.py class GatedGraphConv (line 10) | class GatedGraphConv(MessagePassing): method __init__ (line 32) | def __init__(self, input_dim, num_timesteps, num_edge_types, aggr='add... method reset_parameters (line 46) | def reset_parameters(self): method forward (line 53) | def forward(self, x, edge_indices): method __repr__ (line 81) | def __repr__(self): FILE: predictors/spider_predictor.py class WikiTablesParserPredictor (line 10) | class WikiTablesParserPredictor(Predictor): method __init__ (line 11) | def __init__(self, model: Model, dataset_reader: DatasetReader) -> None: method predict_instance (line 15) | def predict_instance(self, instance: Instance) -> JsonDict: method dump_line (line 26) | def dump_line(self, outputs: JsonDict) -> str: # pylint: disable=no-s... FILE: semparse/contexts/spider_context_utils.py function format_grammar_string (line 16) | def format_grammar_string(grammar_dictionary: Dict[str, List[str]]) -> str: function initialize_valid_actions (line 25) | def initialize_valid_actions(grammar: Grammar, function format_action (line 64) | def format_action(nonterminal: str, function action_sequence_to_sql (line 112) | def action_sequence_to_sql(action_sequences: List[str], add_table_names:... class SqlVisitor (line 139) | class SqlVisitor(NodeVisitor): method __init__ (line 162) | def __init__(self, grammar: Grammar, keywords_to_uppercase: List[str] ... method generic_visit (line 168) | def generic_visit(self, node: Node, visited_children: List[None]) -> L... method add_action (line 174) | def add_action(self, node: Node) -> None: method visit (line 205) | def visit(self, node): FILE: semparse/contexts/spider_db_context.py class SpiderDBContext (line 30) | class SpiderDBContext: method __init__ (line 35) | def __init__(self, db_id: str, utterance: str, tokenizer: Tokenizer, t... method entity_key_for_column (line 56) | def entity_key_for_column(table_name: str, column: TableColumn) -> str: method get_db_knowledge_graph (line 65) | def get_db_knowledge_graph(self, db_id: str) -> KnowledgeGraph: method _string_in_table (line 134) | def _string_in_table(self, candidate: str, method get_entities_from_question (line 152) | def get_entities_from_question(self, method normalize_string (line 182) | def normalize_string(string: str) -> str: method _expand_entities (line 221) | def _expand_entities(self, question, entity_data, string_column_mappin... FILE: semparse/contexts/spider_db_grammar.py function update_grammar_with_tables (line 105) | def update_grammar_with_tables(grammar_dictionary: Dict[str, List[str]], function update_grammar_to_be_table_names_free (line 118) | def update_grammar_to_be_table_names_free(grammar_dictionary: Dict[str, ... function update_grammar_flip_joins (line 131) | def update_grammar_flip_joins(grammar_dictionary: Dict[str, List[str]]): FILE: semparse/worlds/evaluate.py function condition_has_or (line 57) | def condition_has_or(conds): function condition_has_like (line 61) | def condition_has_like(conds): function condition_has_sql (line 65) | def condition_has_sql(conds): function val_has_op (line 75) | def val_has_op(val_unit): function has_agg (line 79) | def has_agg(unit): function accuracy (line 83) | def accuracy(count, total): function recall (line 89) | def recall(count, total): function F1 (line 95) | def F1(acc, rec): function get_scores (line 101) | def get_scores(count, pred_total, label_total): function eval_sel (line 109) | def eval_sel(pred, label): function eval_where (line 129) | def eval_where(pred, label): function eval_group (line 149) | def eval_group(pred, label): function eval_having (line 164) | def eval_having(pred, label): function eval_order (line 181) | def eval_order(pred, label): function eval_and_or (line 193) | def eval_and_or(pred, label): function get_nestedSQL (line 204) | def get_nestedSQL(sql): function eval_nested (line 220) | def eval_nested(pred, label): function eval_IUEN (line 233) | def eval_IUEN(pred, label): function get_keywords (line 243) | def get_keywords(sql): function eval_keywords (line 284) | def eval_keywords(pred, label): function count_agg (line 297) | def count_agg(units): function count_component1 (line 301) | def count_component1(sql): function count_component2 (line 322) | def count_component2(sql): function count_others (line 327) | def count_others(sql): class Evaluator (line 355) | class Evaluator: method __init__ (line 357) | def __init__(self): method eval_hardness (line 360) | def eval_hardness(self, sql): method eval_exact_match (line 377) | def eval_exact_match(self, pred, label): method eval_partial_match (line 396) | def eval_partial_match(self, pred, label): function isValidSQL (line 438) | def isValidSQL(sql, db): function print_scores (line 448) | def print_scores(scores, etype): function evaluate (line 482) | def evaluate(gold, predict, db_dir, etype, kmaps): function eval_exec_match (line 625) | def eval_exec_match(db, p_str, g_str, pred, gold): function rebuild_cond_unit_val (line 655) | def rebuild_cond_unit_val(cond_unit): function rebuild_condition_val (line 671) | def rebuild_condition_val(condition): function rebuild_sql_val (line 684) | def rebuild_sql_val(sql): function build_valid_col_units (line 699) | def build_valid_col_units(table_units, schema): function rebuild_col_unit_col (line 709) | def rebuild_col_unit_col(valid_col_units, col_unit, kmap): function rebuild_val_unit_col (line 721) | def rebuild_val_unit_col(valid_col_units, val_unit, kmap): function rebuild_table_unit_col (line 731) | def rebuild_table_unit_col(valid_col_units, table_unit, kmap): function rebuild_cond_unit_col (line 741) | def rebuild_cond_unit_col(valid_col_units, cond_unit, kmap): function rebuild_condition_col (line 750) | def rebuild_condition_col(valid_col_units, condition, kmap): function rebuild_select_col (line 757) | def rebuild_select_col(valid_col_units, sel, kmap): function rebuild_from_col (line 770) | def rebuild_from_col(valid_col_units, from_, kmap): function rebuild_group_by_col (line 779) | def rebuild_group_by_col(valid_col_units, group_by, kmap): function rebuild_order_by_col (line 786) | def rebuild_order_by_col(valid_col_units, order_by, kmap): function rebuild_sql_col (line 795) | def rebuild_sql_col(valid_col_units, sql, kmap): function build_foreign_key_map (line 812) | def build_foreign_key_map(entry): function build_foreign_key_map_from_json (line 852) | def build_foreign_key_map_from_json(table): FILE: semparse/worlds/evaluate_spider.py function evaluate (line 12) | def evaluate(gold, predict, db_name, db_dir, table, check_valid: bool=Tr... function check_valid_sql (line 56) | def check_valid_sql(sql, db_name, db_dir, return_error=False): FILE: semparse/worlds/spider_world.py class SpiderWorld (line 13) | class SpiderWorld: method __init__ (line 18) | def __init__(self, db_context: SpiderDBContext, query: Optional[List[s... method get_action_sequence_and_all_actions (line 39) | def get_action_sequence_and_all_actions(self, method get_all_actions (line 69) | def get_all_actions(self, schema, method is_global_rule (line 92) | def is_global_rule(self, rhs: str) -> bool: method get_oracle_relevance_score (line 98) | def get_oracle_relevance_score(self, oracle_entities: set): method get_action_entity_mapping (line 116) | def get_action_entity_mapping(self) -> Dict[int, int]: method get_query_without_table_hints (line 132) | def get_query_without_table_hints(self): FILE: spider_evaluation/evaluate.py function condition_has_or (line 57) | def condition_has_or(conds): function condition_has_like (line 61) | def condition_has_like(conds): function condition_has_sql (line 65) | def condition_has_sql(conds): function val_has_op (line 75) | def val_has_op(val_unit): function has_agg (line 79) | def has_agg(unit): function accuracy (line 83) | def accuracy(count, total): function recall (line 89) | def recall(count, total): function F1 (line 95) | def F1(acc, rec): function get_scores (line 101) | def get_scores(count, pred_total, label_total): function eval_sel (line 109) | def eval_sel(pred, label): function eval_where (line 129) | def eval_where(pred, label): function eval_group (line 149) | def eval_group(pred, label): function eval_having (line 164) | def eval_having(pred, label): function eval_order (line 181) | def eval_order(pred, label): function eval_and_or (line 193) | def eval_and_or(pred, label): function get_nestedSQL (line 204) | def get_nestedSQL(sql): function eval_nested (line 220) | def eval_nested(pred, label): function eval_IUEN (line 233) | def eval_IUEN(pred, label): function get_keywords (line 243) | def get_keywords(sql): function eval_keywords (line 284) | def eval_keywords(pred, label): function count_agg (line 297) | def count_agg(units): function count_component1 (line 301) | def count_component1(sql): function count_component2 (line 322) | def count_component2(sql): function count_others (line 327) | def count_others(sql): class Evaluator (line 355) | class Evaluator: method __init__ (line 357) | def __init__(self): method eval_hardness (line 360) | def eval_hardness(self, sql): method eval_exact_match (line 377) | def eval_exact_match(self, pred, label): method eval_partial_match (line 396) | def eval_partial_match(self, pred, label): function isValidSQL (line 438) | def isValidSQL(sql, db): function print_scores (line 448) | def print_scores(scores, etype): function evaluate (line 482) | def evaluate(gold, predict, db_dir, etype, kmaps): function eval_exec_match (line 625) | def eval_exec_match(db, p_str, g_str, pred, gold): function rebuild_cond_unit_val (line 655) | def rebuild_cond_unit_val(cond_unit): function rebuild_condition_val (line 671) | def rebuild_condition_val(condition): function rebuild_sql_val (line 684) | def rebuild_sql_val(sql): function build_valid_col_units (line 699) | def build_valid_col_units(table_units, schema): function rebuild_col_unit_col (line 709) | def rebuild_col_unit_col(valid_col_units, col_unit, kmap): function rebuild_val_unit_col (line 721) | def rebuild_val_unit_col(valid_col_units, val_unit, kmap): function rebuild_table_unit_col (line 731) | def rebuild_table_unit_col(valid_col_units, table_unit, kmap): function rebuild_cond_unit_col (line 741) | def rebuild_cond_unit_col(valid_col_units, cond_unit, kmap): function rebuild_condition_col (line 750) | def rebuild_condition_col(valid_col_units, condition, kmap): function rebuild_select_col (line 757) | def rebuild_select_col(valid_col_units, sel, kmap): function rebuild_from_col (line 770) | def rebuild_from_col(valid_col_units, from_, kmap): function rebuild_group_by_col (line 779) | def rebuild_group_by_col(valid_col_units, group_by, kmap): function rebuild_order_by_col (line 786) | def rebuild_order_by_col(valid_col_units, order_by, kmap): function rebuild_sql_col (line 795) | def rebuild_sql_col(valid_col_units, sql, kmap): function build_foreign_key_map (line 812) | def build_foreign_key_map(entry): function build_foreign_key_map_from_json (line 852) | def build_foreign_key_map_from_json(table): FILE: spider_evaluation/process_sql.py class Schema (line 48) | class Schema: method __init__ (line 52) | def __init__(self, schema): method schema (line 57) | def schema(self): method idMap (line 61) | def idMap(self): method _map (line 64) | def _map(self, schema): function get_schema (line 79) | def get_schema(db): function get_schema_from_json (line 103) | def get_schema_from_json(fpath): function tokenize (line 116) | def tokenize(string): function scan_alias (line 150) | def scan_alias(toks): function get_tables_with_alias (line 159) | def get_tables_with_alias(schema, toks): function parse_col (line 167) | def parse_col(toks, start_idx, tables_with_alias, schema, default_tables... function parse_col_unit (line 194) | def parse_col_unit(toks, start_idx, tables_with_alias, schema, default_t... function parse_val_unit (line 232) | def parse_val_unit(toks, start_idx, tables_with_alias, schema, default_t... function parse_table_unit (line 257) | def parse_table_unit(toks, start_idx, tables_with_alias, schema): function parse_value (line 273) | def parse_value(toks, start_idx, tables_with_alias, schema, default_tabl... function parse_condition (line 307) | def parse_condition(toks, start_idx, tables_with_alias, schema, default_... function parse_select (line 344) | def parse_select(toks, start_idx, tables_with_alias, schema, default_tab... function parse_from (line 369) | def parse_from(toks, start_idx, tables_with_alias, schema): function parse_where (line 412) | def parse_where(toks, start_idx, tables_with_alias, schema, default_tabl... function parse_group_by (line 424) | def parse_group_by(toks, start_idx, tables_with_alias, schema, default_t... function parse_order_by (line 447) | def parse_order_by(toks, start_idx, tables_with_alias, schema, default_t... function parse_having (line 474) | def parse_having(toks, start_idx, tables_with_alias, schema, default_tab... function parse_limit (line 486) | def parse_limit(toks, start_idx): function parse_sql (line 501) | def parse_sql(toks, start_idx, tables_with_alias, schema, mapped_entitie... function load_data (line 559) | def load_data(fpath): function get_sql (line 565) | def get_sql(schema, query): function skip_semicolon (line 573) | def skip_semicolon(toks, start_idx): FILE: state_machines/states/grammar_based_state.py class GrammarBasedState (line 16) | class GrammarBasedState(State['GrammarBasedState']): method __init__ (line 58) | def __init__(self, method new_state_from_group_index (line 78) | def new_state_from_group_index(self, method print_action_history (line 117) | def print_action_history(self, group_index: int = None) -> None: method get_valid_actions (line 125) | def get_valid_actions(self) -> List[Dict[str, Tuple[torch.Tensor, torc... method is_finished (line 133) | def is_finished(self) -> bool: method combine_states (line 139) | def combine_states(cls, states: Sequence['GrammarBasedState']) -> 'Gra... FILE: state_machines/states/rnn_statelet.py class RnnStatelet (line 8) | class RnnStatelet: method __init__ (line 48) | def __init__(self, method __eq__ (line 64) | def __eq__(self, other): FILE: state_machines/states/sql_state.py class SqlState (line 7) | class SqlState: method __init__ (line 8) | def __init__(self, method take_action (line 19) | def take_action(self, production_rule: str) -> 'SqlState': method get_valid_actions (line 63) | def get_valid_actions(self, valid_actions: dict): method _remove_actions (line 177) | def _remove_actions(valid_actions, key, ids_to_remove): method _get_current_open_clause (line 202) | def _get_current_open_clause(self): FILE: state_machines/transition_functions/attend_past_schema_items_transition.py class AttendPastSchemaItemsTransitionFunction (line 17) | class AttendPastSchemaItemsTransitionFunction(BasicTransitionFunction): method __init__ (line 18) | def __init__(self, method take_step (line 43) | def take_step(self, method _update_decoder_state (line 74) | def _update_decoder_state(self, state: GrammarBasedState) -> Dict[str,... method _compute_action_probabilities (line 149) | def _compute_action_probabilities(self, method _construct_next_states (line 244) | def _construct_next_states(self, method attend (line 364) | def attend(self, FILE: state_machines/transition_functions/basic_transition_function.py class BasicTransitionFunction (line 16) | class BasicTransitionFunction(TransitionFunction[GrammarBasedState]): method __init__ (line 53) | def __init__(self, method take_step (line 102) | def take_step(self, method _update_decoder_state (line 132) | def _update_decoder_state(self, state: GrammarBasedState) -> Dict[str,... method _compute_action_probabilities (line 192) | def _compute_action_probabilities(self, method _construct_next_states (line 232) | def _construct_next_states(self, method _take_first_step (line 333) | def _take_first_step(self, method attend_on_question (line 400) | def attend_on_question(self, FILE: state_machines/transition_functions/linking_transition_function.py class LinkingTransitionFunction (line 16) | class LinkingTransitionFunction(BasicTransitionFunction): method __init__ (line 58) | def __init__(self, method _compute_action_probabilities (line 87) | def _compute_action_probabilities(self, FILE: state_machines/transition_functions/prefix_attend_transition.py class PrefixAttendTransitionFunction (line 15) | class PrefixAttendTransitionFunction(LinkingTransitionFunction): method __init__ (line 16) | def __init__(self, method take_step (line 49) | def take_step(self, method _update_decoder_state (line 80) | def _update_decoder_state(self, state: GrammarBasedState) -> Dict[str,... method attend (line 146) | def attend(self, method _construct_next_states (line 166) | def _construct_next_states(self,