SYMBOL INDEX (167 symbols across 15 files) FILE: config.py function str2bool (line 29) | def str2bool(v): function add_model_args (line 33) | def add_model_args(parser): function get_model_args (line 108) | def get_model_args(args): function override_model_args (line 120) | def override_model_args(old_args, new_args): FILE: data.py class Dictionary (line 25) | class Dictionary(object): method normalize (line 31) | def normalize(token): method __init__ (line 34) | def __init__(self): method __len__ (line 38) | def __len__(self): method __iter__ (line 41) | def __iter__(self): method __contains__ (line 44) | def __contains__(self, key): method __getitem__ (line 50) | def __getitem__(self, key): method __setitem__ (line 57) | def __setitem__(self, key, item): method add (line 65) | def add(self, token): method tokens (line 72) | def tokens(self): class ReaderDataset (line 88) | class ReaderDataset(Dataset): method __init__ (line 90) | def __init__(self, examples, model, single_answer=False): method __len__ (line 95) | def __len__(self): method __getitem__ (line 98) | def __getitem__(self, index): method lengths (line 101) | def lengths(self): class SortedBatchSampler (line 111) | class SortedBatchSampler(Sampler): method __init__ (line 113) | def __init__(self, lengths, batch_size, shuffle=True): method __iter__ (line 118) | def __iter__(self): method __len__ (line 130) | def __len__(self): FILE: layers.py class StackedBRNN (line 22) | class StackedBRNN(nn.Module): method __init__ (line 30) | def __init__(self, input_size, hidden_size, num_layers, method forward (line 46) | def forward(self, x, x_mask): method _forward_unpadded (line 70) | def _forward_unpadded(self, x, x_mask): method _forward_padded (line 105) | def _forward_padded(self, x, x_mask): class FeedForwardNetwork (line 170) | class FeedForwardNetwork(nn.Module): method __init__ (line 171) | def __init__(self, input_size, hidden_size, output_size, dropout_rate=0): method forward (line 177) | def forward(self, x): class PointerNetwork (line 183) | class PointerNetwork(nn.Module): method __init__ (line 184) | def __init__(self, x_size, y_size, hidden_size, dropout_rate=0, cell_t... method init_hiddens (line 194) | def init_hiddens(self, y, y_mask): method pointer (line 199) | def pointer(self, x, state, x_mask): method forward (line 218) | def forward(self, x, y, x_mask, y_mask): class MemoryAnsPointer (line 226) | class MemoryAnsPointer(nn.Module): method __init__ (line 227) | def __init__(self, x_size, y_size, hidden_size, hop=1, dropout_rate=0,... method forward (line 243) | def forward(self, x, y, x_mask, y_mask): class SeqAttnMatch (line 283) | class SeqAttnMatch(nn.Module): method __init__ (line 290) | def __init__(self, input_size, identity=False): method forward (line 297) | def forward(self, x, y, y_mask): class SelfAttnMatch (line 330) | class SelfAttnMatch(nn.Module): method __init__ (line 337) | def __init__(self, input_size, identity=False, diag=True): method forward (line 345) | def forward(self, x, x_mask): class BilinearSeqAttn (line 379) | class BilinearSeqAttn(nn.Module): method __init__ (line 387) | def __init__(self, x_size, y_size, identity=False, normalize=True): method forward (line 397) | def forward(self, x, y, x_mask): class LinearSeqAttn (line 421) | class LinearSeqAttn(nn.Module): method __init__ (line 427) | def __init__(self, input_size): method forward (line 431) | def forward(self, x, x_mask): class NonLinearSeqAttn (line 445) | class NonLinearSeqAttn(nn.Module): method __init__ (line 451) | def __init__(self, input_size, hidden_size): method forward (line 455) | def forward(self, x, x_mask): class Gate (line 473) | class Gate(nn.Module): method __init__ (line 478) | def __init__(self, input_size): method forward (line 482) | def forward(self, x): class SFU (line 495) | class SFU(nn.Module): method __init__ (line 500) | def __init__(self, input_size, fusion_size): method forward (line 505) | def forward(self, x, fusions): function uniform_weights (line 518) | def uniform_weights(x, x_mask): function weighted_avg (line 535) | def weighted_avg(x, weights): FILE: m_reader.py class MnemonicReader (line 21) | class MnemonicReader(nn.Module): method __init__ (line 24) | def __init__(self, args, normalize=True): method forward (line 105) | def forward(self, x1, x1_c, x1_f, x1_mask, x2, x2_c, x2_f, x2_mask): FILE: model.py class DocReader (line 26) | class DocReader(object): method __init__ (line 35) | def __init__(self, args, word_dict, char_dict, feature_dict, method expand_dictionary (line 70) | def expand_dictionary(self, words): method expand_char_dictionary (line 101) | def expand_char_dictionary(self, chars): method load_embeddings (line 131) | def load_embeddings(self, words, embedding_file): method load_char_embeddings (line 169) | def load_char_embeddings(self, chars, char_embedding_file): method tune_embeddings (line 207) | def tune_embeddings(self, words): method init_optimizer (line 248) | def init_optimizer(self, state_dict=None): method update (line 277) | def update(self, ex): method reset_parameters (line 318) | def reset_parameters(self): method predict (line 338) | def predict(self, ex, candidates=None, top_n=1, async_pool=None): method decode (line 389) | def decode(score_s, score_e, top_n=1, max_len=None): method decode_candidates (line 427) | def decode_candidates(score_s, score_e, candidates, top_n=1, max_len=N... method save (line 480) | def save(self, filename): method checkpoint (line 496) | def checkpoint(self, filename, epoch): method load (line 512) | def load(filename, new_args=None, normalize=True): method load_checkpoint (line 531) | def load_checkpoint(filename, normalize=True): method cuda (line 551) | def cuda(self): method cpu (line 555) | def cpu(self): method parallelize (line 559) | def parallelize(self): FILE: predictor.py function init (line 28) | def init(options): function tokenize (line 34) | def tokenize(text): function get_annotators_for_model (line 38) | def get_annotators_for_model(model): class Predictor (line 54) | class Predictor(object): method __init__ (line 57) | def __init__(self, model, normalize=True, method predict (line 94) | def predict(self, document, question, candidates=None, top_n=1): method predict_batch (line 99) | def predict_batch(self, batch, top_n=1): method cuda (line 153) | def cuda(self): method cpu (line 156) | def cpu(self): FILE: r_net.py class R_Net (line 21) | class R_Net(nn.Module): method __init__ (line 24) | def __init__(self, args, normalize=True): method forward (line 124) | def forward(self, x1, x1_c, x1_f, x1_mask, x2, x2_c, x2_f, x2_mask): FILE: rnn_reader.py class RnnDocReader (line 19) | class RnnDocReader(nn.Module): method __init__ (line 22) | def __init__(self, args, normalize=True): method forward (line 92) | def forward(self, x1, x1_c, x1_f, x1_mask, x2, x2_c, x2_f, x2_mask): FILE: script/evaluate-v1.1.py function normalize_answer (line 11) | def normalize_answer(s): function f1_score (line 29) | def f1_score(prediction, ground_truth): function exact_match_score (line 42) | def exact_match_score(prediction, ground_truth): function metric_max_over_ground_truths (line 46) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): function evaluate (line 54) | def evaluate(dataset, predictions): FILE: script/interactive.py function process (line 35) | def process(document, question, candidates=None, top_n=1): function usage (line 57) | def usage(): FILE: script/preprocess.py function init (line 32) | def init(): function tokenize (line 38) | def tokenize(text): function load_dataset (line 58) | def load_dataset(path): function find_answer (line 76) | def find_answer(offsets, begin_offset, end_offset): function process_dataset (line 86) | def process_dataset(data, tokenizer, workers=None): FILE: script/train.py function str2bool (line 39) | def str2bool(v): function add_train_args (line 43) | def add_train_args(parser): function set_defaults (line 125) | def set_defaults(args): function init_from_scratch (line 194) | def init_from_scratch(args, train_exs, dev_exs): function train (line 231) | def train(args, data_loader, model, global_stats): function validate_unofficial (line 263) | def validate_unofficial(args, data_loader, model, global_stats, mode): function validate_official (line 299) | def validate_official(args, data_loader, model, global_stats, function eval_accuracies (line 341) | def eval_accuracies(pred_s, target_s, pred_e, target_e): function main (line 382) | def main(args): FILE: spacy_tokenizer.py class Tokens (line 15) | class Tokens(object): method __init__ (line 25) | def __init__(self, data, annotators, opts=None): method __len__ (line 30) | def __len__(self): method slice (line 34) | def slice(self, i=None, j=None): method untokenize (line 40) | def untokenize(self): method chars (line 44) | def chars(self, uncased=False): method words (line 55) | def words(self, uncased=False): method offsets (line 66) | def offsets(self): method pos (line 70) | def pos(self): method lemmas (line 78) | def lemmas(self): method entities (line 86) | def entities(self): method ngrams (line 94) | def ngrams(self, n=1, uncased=False, filter_fn=None, as_strings=True): method entity_groups (line 121) | def entity_groups(self): class SpacyTokenizer (line 143) | class SpacyTokenizer(object): method __init__ (line 145) | def __init__(self, **kwargs): method tokenize (line 161) | def tokenize(self, text): method shutdown (line 188) | def shutdown(self): method __del__ (line 191) | def __del__(self): FILE: utils.py function load_data (line 33) | def load_data(args, filename, skip_no_answer=False): function load_text (line 57) | def load_text(filename): function load_answers (line 71) | def load_answers(filename): function index_embedding_words (line 90) | def index_embedding_words(embedding_file): function load_words (line 100) | def load_words(args, examples): function build_word_dict (line 123) | def build_word_dict(args, examples): function index_embedding_chars (line 132) | def index_embedding_chars(char_embedding_file): function load_chars (line 141) | def load_chars(args, examples): function build_char_dict (line 164) | def build_char_dict(args, examples): function top_question_words (line 173) | def top_question_words(args, examples, word_dict): function build_feature_dict (line 184) | def build_feature_dict(args, examples): function normalize_answer (line 227) | def normalize_answer(s): function f1_score (line 245) | def f1_score(prediction, ground_truth): function exact_match_score (line 259) | def exact_match_score(prediction, ground_truth): function regex_match_score (line 264) | def regex_match_score(prediction, pattern): function metric_max_over_ground_truths (line 277) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): class AverageMeter (line 293) | class AverageMeter(object): method __init__ (line 296) | def __init__(self): method reset (line 299) | def reset(self): method update (line 305) | def update(self, val, n=1): class Timer (line 312) | class Timer(object): method __init__ (line 315) | def __init__(self): method reset (line 320) | def reset(self): method resume (line 326) | def resume(self): method stop (line 332) | def stop(self): method time (line 338) | def time(self): FILE: vector.py function vectorize (line 13) | def vectorize(ex, model, single_answer=False): function batchify (line 107) | def batchify(batch):