SYMBOL INDEX (130 symbols across 16 files) FILE: src/core/bamnet/bamnet.py function get_text_overlap (line 26) | def get_text_overlap(raw_query, query_mentions, ctx_ent_names, vocab2id,... class BAMnetAgent (line 57) | class BAMnetAgent(object): method __init__ (line 60) | def __init__(self, opt, ctx_stops, vocab2id): method train (line 106) | def train(self, train_X, train_y, valid_X, valid_y, valid_cand_labels,... method predict (line 166) | def predict(self, xs, cand_labels, batch_size=32, margin=1, ys=None, v... method train_step (line 179) | def train_step(self, xs, ys, is_training=True): method predict_step (line 210) | def predict_step(self, xs, cand_labels, margin, verbose=False): method dynamic_ctx_negative_sampling (line 225) | def dynamic_ctx_negative_sampling(self, memories, ys, mem_size, ctx_bo... method pad_ctx_memory (line 279) | def pad_ctx_memory(self, memories, ctx_bow_size, raw_queries, query_me... method pack_gold_ans (line 321) | def pack_gold_ans(self, x, N, placeholder=-1): method set_loss_margin (line 329) | def set_loss_margin(self, scores, gold_mask, margin): method ranked_predictions (line 338) | def ranked_predictions(self, cand_labels, scores, margin): method save (line 345) | def save(self, path=None): method load (line 356) | def load(self, path): FILE: src/core/bamnet/ent_modules.py class Entnet (line 20) | class Entnet(nn.Module): method __init__ (line 21) | def __init__(self, vocab_size, vocab_embed_size, o_embed_size, \ method forward (line 64) | def forward(self, memories, queries, query_lengths): method clf_score (line 100) | def clf_score(self, q_r, ent_key): method create_mask (line 103) | def create_mask(self, x, N, use_cuda=True): method create_mask_3D (line 110) | def create_mask_3D(self, x, N, use_cuda=True): class EntEncoder (line 118) | class EntEncoder(nn.Module): method __init__ (line 120) | def __init__(self, o_embed_size, hidden_size, num_ent_types, num_relat... method forward (line 168) | def forward(self, x_ent_names, x_ent_name_len, x_type_names, x_types, ... method enc_kg_features (line 182) | def enc_kg_features(self, x_ent_names, x_ent_name_len, x_type_names, x... class EntRomHop (line 198) | class EntRomHop(nn.Module): method __init__ (line 199) | def __init__(self, query_embed_size, in_memory_embed_size, hidden_size... method forward (line 204) | def forward(self, h_state, key_memory_embed, val_memory_embed, atten_m... class GRUStep (line 211) | class GRUStep(nn.Module): method __init__ (line 212) | def __init__(self, hidden_size, input_size): method forward (line 219) | def forward(self, h_state, input_): FILE: src/core/bamnet/entnet.py class EntnetAgent (line 24) | class EntnetAgent(object): method __init__ (line 25) | def __init__(self, opt): method train (line 69) | def train(self, train_X, train_y, valid_X, valid_y, seed=1234): method evaluate (line 126) | def evaluate(self, xs, ys, batch_size=1, silence=False): method predict (line 141) | def predict(self, xs, cand_labels, batch_size=1, silence=False): method train_step (line 152) | def train_step(self, xs, ys, is_training=True): method evaluate_step (line 179) | def evaluate_step(self, xs, ys): method predict_step (line 193) | def predict_step(self, xs, cand_labels): method pack_gold_ans (line 205) | def pack_gold_ans(self, x, N, placeholder=-1): method ranked_predictions (line 213) | def ranked_predictions(self, cand_labels, scores): method save (line 218) | def save(self, path=None): method load (line 229) | def load(self, path): FILE: src/core/bamnet/modules.py class BAMnet (line 19) | class BAMnet(nn.Module): method __init__ (line 20) | def __init__(self, vocab_size, vocab_embed_size, o_embed_size, \ method kb_aware_query_enc (line 60) | def kb_aware_query_enc(self, memories, queries, query_lengths, ans_mas... method forward (line 97) | def forward(self, memories, queries, query_lengths, query_words, ctx_m... method premature_score (line 136) | def premature_score(self, memories, queries, query_lengths, ctx_mask=N... method scoring (line 149) | def scoring(self, ans_r, q_r, mask=None): class RomHop (line 155) | class RomHop(nn.Module): method __init__ (line 156) | def __init__(self, query_embed_size, in_memory_embed_size, hidden_size... method forward (line 164) | def forward(self, query_embed, in_memory_embed, out_memory_embed, quer... method gru_step (line 170) | def gru_step(self, h_state, in_memory_embed, out_memory_embed, atten_m... method update_coatt_cat_maxpool (line 182) | def update_coatt_cat_maxpool(self, query_embed, in_memory_embed, out_m... class AnsEncoder (line 208) | class AnsEncoder(nn.Module): method __init__ (line 210) | def __init__(self, o_embed_size, hidden_size, num_ent_types, num_relat... method forward (line 250) | def forward(self, x_type_bow, x_types, x_type_bow_len, x_path_bow, x_p... method enc_comp_kv (line 255) | def enc_comp_kv(self, ans_type_bow, ans_types, ans_path_bow, ans_paths... method enc_ans_features (line 268) | def enc_ans_features(self, x_type_bow, x_types, x_type_bow_len, x_path... class SeqEncoder (line 293) | class SeqEncoder(object): method __init__ (line 295) | def __init__(self, vocab_size, embed_size, hidden_size, \ class EncoderRNN (line 317) | class EncoderRNN(nn.Module): method __init__ (line 318) | def __init__(self, vocab_size, embed_size, hidden_size, dropout=None, \ method init_weights (line 340) | def init_weights(self, init_word_embed): method forward (line 347) | def forward(self, x, x_len): class EncoderCNN (line 378) | class EncoderCNN(nn.Module): method __init__ (line 379) | def __init__(self, vocab_size, embed_size, hidden_size, kernel_size=[2... method init_weights (line 393) | def init_weights(self, init_word_embed): method forward (line 400) | def forward(self, x, x_len=None): class Attention (line 419) | class Attention(nn.Module): method __init__ (line 420) | def __init__(self, hidden_size, h_state_embed_size=None, in_memory_emb... method forward (line 440) | def forward(self, query_embed, in_memory_embed, atten_mask=None): class SelfAttention_CoAtt (line 458) | class SelfAttention_CoAtt(nn.Module): method __init__ (line 459) | def __init__(self, hidden_size, use_cuda=True): method forward (line 465) | def forward(self, x, x_len, atten_mask): function create_mask (line 485) | def create_mask(x, N, use_cuda=True): FILE: src/core/bamnet/utils.py function to_cuda (line 12) | def to_cuda(x, use_cuda=True): function next_batch (line 18) | def next_batch(memories, queries, query_words, raw_queries, query_mentio... function next_ent_batch (line 23) | def next_ent_batch(memories, queries, query_lengths, gold_inds, batch_si... FILE: src/core/build_data/build_all.py function build (line 14) | def build(dpath, version=None, out_dir=None): FILE: src/core/build_data/build_data.py function build_kb_data (line 24) | def build_kb_data(kb, used_fbkeys=None): function build_qa_vocab (line 114) | def build_qa_vocab(qa): function delex_query_topic_ent (line 121) | def delex_query_topic_ent(query, topic_ent, ent_types): function delex_query (line 162) | def delex_query(query, ent_mens, mention_types): function build_data (line 178) | def build_data(qa, kb, entity2id, entityType2id, relation2id, vocab2id, ... function build_vocab (line 225) | def build_vocab(data, freebase, used_fbkeys=None, min_freq=1): function build_ans_cands (line 265) | def build_ans_cands(graph, entity2id, entityType2id, relation2id, vocab2... function build_seed_ent_data (line 449) | def build_seed_ent_data(qa, kb, entity2id, entityType2id, relation2id, v... function build_seed_entity_feature (line 484) | def build_seed_entity_feature(seed_ent, graph, entity2id, entityType2id,... FILE: src/core/build_data/freebase.py function fetch_meta (line 12) | def fetch_meta(path): function fetch (line 37) | def fetch(data, data_dir): FILE: src/core/build_data/utils.py function built (line 17) | def built(path, version_string=None): function mark_done (line 33) | def mark_done(path, version_string=None): function make_dir (line 42) | def make_dir(path): function remove_dir (line 46) | def remove_dir(path): function vectorize_data (line 50) | def vectorize_data(queries, query_mentions, memories, max_query_size=Non... function vectorize_ent_data (line 199) | def vectorize_ent_data(queries, ent_memories, max_query_size=None, \ FILE: src/core/build_data/webquestions.py function get_used_fbkeys (line 17) | def get_used_fbkeys(data_dir, out_dir): function get_all_fbkeys (line 28) | def get_all_fbkeys(data_dir, out_dir): function main (line 48) | def main(fb_path, mid2key_path, data_dir, out_dir): function fetch_ans_cands (line 107) | def fetch_ans_cands(graph): FILE: src/core/utils/freebase_utils.py function if_filterout (line 10) | def if_filterout(s): function query_kb (line 18) | def query_kb(kb, ent_name, fuzz_threshold=90): FILE: src/core/utils/generic_utils.py function find_parent (line 18) | def find_parent(x, tree, conn='<-'): function extract_dep_feature (line 30) | def extract_dep_feature(dep_parser, text, topic_ent, question_word): function unique (line 51) | def unique(seq): function normalize_answer (line 59) | def normalize_answer(s): function dump_embeddings (line 75) | def dump_embeddings(vocab_dict, emb_file, out_path, emb_size=300, binary... function get_embeddings (line 88) | def get_embeddings(emb_file, vocab, binary=False): class PreTrainEmbedding (line 101) | class PreTrainEmbedding(): method __init__ (line 102) | def __init__(self, file, binary=False): method get_embeddings (line 106) | def get_embeddings(self, word): FILE: src/core/utils/metrics.py function calc_f1 (line 12) | def calc_f1(gold_list, pred_list): function calc_avg_f1 (line 44) | def calc_avg_f1(gold_list, pred_list, verbose=True): FILE: src/core/utils/utils.py function get_config (line 20) | def get_config(config_path="config.yml"): function print_config (line 25) | def print_config(config): function read_lines (line 33) | def read_lines(path_to_file): function dump_ndarray (line 45) | def dump_ndarray(data, path_to_file): function load_ndarray (line 52) | def load_ndarray(path_to_file): function dump_ndjson (line 61) | def dump_ndjson(data, file): function load_ndjson (line 69) | def load_ndjson(file, return_type='array'): function load_ndjson_to_array (line 77) | def load_ndjson_to_array(file): function load_ndjson_to_dict (line 87) | def load_ndjson_to_dict(file): function dump_json (line 97) | def dump_json(data, file, indent=None): function load_json (line 104) | def load_json(file): function dump_dict_ndjson (line 112) | def dump_dict_ndjson(data, file): function load_gzip_json (line 121) | def load_gzip_json(file): function get_all_files (line 129) | def get_all_files(dir, recursive=False): function printProgressBar (line 136) | def printProgressBar(iteration, total, prefix = '', suffix = '', decimal... FILE: src/joint_test.py function dynamic_pred (line 15) | def dynamic_pred(pred, margin): FILE: src/test.py function dynamic_pred (line 12) | def dynamic_pred(pred, margin):