SYMBOL INDEX (110 symbols across 14 files) FILE: data.py class Dictionary (line 6) | class Dictionary(object): method __init__ (line 7) | def __init__(self): method add_word (line 12) | def add_word(self, word): method getid (line 21) | def getid(self, word, thresh=10): method __len__ (line 26) | def __len__(self): class Corpus (line 30) | class Corpus(object): method __init__ (line 31) | def __init__(self, path): method tokenize (line 40) | def tokenize(self, path): FILE: dual.py function dual (line 17) | def dual(args): function change (line 164) | def change(m): FILE: lm/data.py class Dictionary (line 6) | class Dictionary(object): method __init__ (line 7) | def __init__(self): method add_word (line 12) | def add_word(self, word): method getid (line 21) | def getid(self, word, thresh=10): method __len__ (line 26) | def __len__(self): class Corpus (line 30) | class Corpus(object): method __init__ (line 31) | def __init__(self, path): method tokenize (line 40) | def tokenize(self, path): FILE: lm/lm_prob.py class LMProb (line 11) | class LMProb(): method __init__ (line 13) | def __init__(self, model_path, dict_path): method get_prob (line 22) | def get_prob(self, words, verbose=False): FILE: lm/main.py function batchify (line 71) | def batchify(data, bsz): function repackage_hidden (line 102) | def repackage_hidden(h): function get_batch (line 120) | def get_batch(source, i, evaluation=False): function evaluate (line 127) | def evaluate(data_source): function train (line 142) | def train(): FILE: lm/model.py class RNNModel (line 5) | class RNNModel(nn.Module): method __init__ (line 8) | def __init__(self, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weigh... method init_weights (line 31) | def init_weights(self): method forward (line 37) | def forward(self, input, hidden): method init_hidden (line 44) | def init_hidden(self, bsz): FILE: model.py class RNNModel (line 5) | class RNNModel(nn.Module): method __init__ (line 8) | def __init__(self, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weigh... method init_weights (line 31) | def init_weights(self): method forward (line 37) | def forward(self, input, hidden): method init_hidden (line 44) | def init_hidden(self, bsz): FILE: nmt/channel.py function sample (line 11) | def sample(args): function beam (line 47) | def beam(args): FILE: nmt/model.py function input_transpose (line 12) | def input_transpose(sents, pad_token): function word2id (line 25) | def word2id(sents, vocab): function tensor_transform (line 32) | def tensor_transform(linear, X): class NMT (line 37) | class NMT(nn.Module): method __init__ (line 38) | def __init__(self, args, vocab): method forward (line 68) | def forward(self, src_sents, src_sents_len, tgt_words): method encode (line 74) | def encode(self, src_sents, src_sents_len): method decode (line 92) | def decode(self, src_encoding, dec_init_vec, tgt_sents): method translate (line 139) | def translate(self, src_sents, beam_size=None, to_word=True): method sample (line 248) | def sample(self, src_sents, sample_size=None, to_word=False): method beam (line 340) | def beam(self, src_sents, beam_size=3): method attention (line 466) | def attention(self, h_t, src_encoding, src_linear_for_att): method dot_prod_attention (line 479) | def dot_prod_attention(self, h_t, src_encoding, src_encoding_att_linea... method save (line 498) | def save(self, path): function to_input_variable (line 508) | def to_input_variable(sents, vocab, cuda=False, is_test=False): FILE: nmt/nmt.py function init_config (line 26) | def init_config(): function input_transpose (line 91) | def input_transpose(sents, pad_token): function word2id (line 104) | def word2id(sents, vocab): function tensor_transform (line 111) | def tensor_transform(linear, X): class NMT (line 116) | class NMT(nn.Module): method __init__ (line 117) | def __init__(self, args, vocab): method forward (line 147) | def forward(self, src_sents, src_sents_len, tgt_words): method encode (line 153) | def encode(self, src_sents, src_sents_len): method decode (line 171) | def decode(self, src_encoding, dec_init_vec, tgt_sents): method translate (line 218) | def translate(self, src_sents, beam_size=None, to_word=True): method sample (line 327) | def sample(self, src_sents, sample_size=None, to_word=False): method attention (line 428) | def attention(self, h_t, src_encoding, src_linear_for_att): method dot_prod_attention (line 441) | def dot_prod_attention(self, h_t, src_encoding, src_encoding_att_linea... method save (line 460) | def save(self, path): function to_input_variable (line 470) | def to_input_variable(sents, vocab, cuda=False, is_test=False): function evaluate_loss (line 485) | def evaluate_loss(model, data, crit): function init_training (line 510) | def init_training(args): function train (line 545) | def train(args): function get_bleu (line 686) | def get_bleu(references, hypotheses): function get_acc (line 694) | def get_acc(references, hypotheses, acc_type='word'): function decode (line 711) | def decode(model, data, verbose=True): function compute_lm_prob (line 746) | def compute_lm_prob(args): function test (line 808) | def test(args): function interactive (line 858) | def interactive(args): function sample (line 882) | def sample(args): FILE: nmt/util.py function read_corpus (line 4) | def read_corpus(file_path, source): function batch_slice (line 16) | def batch_slice(data, batch_size, sort=True): function data_iter (line 34) | def data_iter(data, batch_size, shuffle=True): FILE: nmt/vocab.py class VocabEntry (line 11) | class VocabEntry(object): method __init__ (line 12) | def __init__(self): method __getitem__ (line 22) | def __getitem__(self, word): method __contains__ (line 25) | def __contains__(self, word): method __setitem__ (line 28) | def __setitem__(self, key, value): method __len__ (line 31) | def __len__(self): method __repr__ (line 34) | def __repr__(self): method id2word (line 37) | def id2word(self, wid): method add (line 40) | def add(self, word): method from_corpus (line 49) | def from_corpus(corpus, size, remove_singleton=True): class Vocab (line 67) | class Vocab(object): method __init__ (line 68) | def __init__(self, src_sents, tgt_sents, src_vocab_size, tgt_vocab_siz... method __repr__ (line 77) | def __repr__(self): FILE: util.py function read_corpus (line 4) | def read_corpus(file_path, source): function batch_slice (line 16) | def batch_slice(data, batch_size, sort=True): function data_iter (line 34) | def data_iter(data, batch_size, shuffle=True): FILE: vocab.py class VocabEntry (line 11) | class VocabEntry(object): method __init__ (line 12) | def __init__(self): method __getitem__ (line 22) | def __getitem__(self, word): method __contains__ (line 25) | def __contains__(self, word): method __setitem__ (line 28) | def __setitem__(self, key, value): method __len__ (line 31) | def __len__(self): method __repr__ (line 34) | def __repr__(self): method id2word (line 37) | def id2word(self, wid): method add (line 40) | def add(self, word): method from_corpus (line 49) | def from_corpus(corpus, size, remove_singleton=True): class Vocab (line 67) | class Vocab(object): method __init__ (line 68) | def __init__(self, src_sents, tgt_sents, src_vocab_size, tgt_vocab_siz... method __repr__ (line 77) | def __repr__(self):