SYMBOL INDEX (331 symbols across 31 files) FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/attention_decoder.py function attention_decoder (line 27) | def attention_decoder(decoder_inputs, initial_state, encoder_states, enc... function linear (line 184) | def linear(args, output_size, bias, bias_start=0.0, scope=None): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/batcher.py class Example (line 28) | class Example(object): method __init__ (line 31) | def __init__(self, article, abstract_sentences, vocab, hps): method get_dec_inp_targ_seqs (line 79) | def get_dec_inp_targ_seqs(self, sequence, max_len, start_id, stop_id): method pad_decoder_inp_targ (line 103) | def pad_decoder_inp_targ(self, max_len, pad_id): method pad_encoder_input (line 111) | def pad_encoder_input(self, max_len, pad_id): class Batch (line 120) | class Batch(object): method __init__ (line 123) | def __init__(self, example_list, hps, vocab): method init_encoder_seq (line 136) | def init_encoder_seq(self, example_list, hps): method init_decoder_seq (line 184) | def init_decoder_seq(self, example_list, hps): method store_orig_strings (line 210) | def store_orig_strings(self, example_list): class Batcher (line 217) | class Batcher(object): method __init__ (line 222) | def __init__(self, data_path, vocab, hps, single_pass): method next_batch (line 271) | def next_batch(self): method fill_example_queue (line 289) | def fill_example_queue(self): method fill_batch_queue (line 311) | def fill_batch_queue(self): method watch_threads (line 339) | def watch_threads(self): method text_generator (line 359) | def text_generator(self, example_generator): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/beam_search.py class Hypothesis (line 25) | class Hypothesis(object): method __init__ (line 28) | def __init__(self, tokens, log_probs, state, attn_dists, p_gens, cover... method extend (line 46) | def extend(self, token, log_prob, state, attn_dist, p_gen, coverage): method latest_token (line 67) | def latest_token(self): method log_prob (line 71) | def log_prob(self): method avg_log_prob (line 76) | def avg_log_prob(self): function run_beam_search (line 81) | def run_beam_search(sess, model, vocab, batch): function sort_hyps (line 164) | def sort_hyps(hyps): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/data.py class Vocab (line 37) | class Vocab(object): method __init__ (line 40) | def __init__(self, vocab_file, max_size): method word2id (line 77) | def word2id(self, word): method id2word (line 83) | def id2word(self, word_id): method size (line 89) | def size(self): method write_metadata (line 93) | def write_metadata(self, fpath): function example_generator (line 108) | def example_generator(data_path, single_pass): function article2ids (line 144) | def article2ids(article_words, vocab): function abstract2ids (line 171) | def abstract2ids(abstract_words, vocab, article_oovs): function outputids2words (line 196) | def outputids2words(id_list, vocab, article_oovs): function abstract2sents (line 222) | def abstract2sents(abstract): function show_art_oovs (line 242) | def show_art_oovs(article, vocab): function show_abs_oovs (line 251) | def show_abs_oovs(abstract, vocab, article_oovs): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/decode.py class BeamSearchDecoder (line 35) | class BeamSearchDecoder(object): method __init__ (line 38) | def __init__(self, model, batcher, vocab): method decode (line 77) | def decode(self): method write_for_rouge (line 127) | def write_for_rouge(self, reference_sents, decoded_words, ex_index): method write_for_attnvis (line 165) | def write_for_attnvis(self, article, abstract, decoded_words, attn_dis... function print_results (line 192) | def print_results(article, abstract, decoded_output): function make_html_safe (line 201) | def make_html_safe(s): function rouge_eval (line 208) | def rouge_eval(ref_dir, dec_dir): function rouge_log (line 220) | def rouge_log(results_dict, dir_to_write): function get_decode_dir_name (line 243) | def get_decode_dir_name(ckpt_name): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/model.py class SummarizationModel (line 28) | class SummarizationModel(object): method __init__ (line 31) | def __init__(self, hps, vocab): method _add_placeholders (line 35) | def _add_placeholders(self): method _make_feed_dict (line 56) | def _make_feed_dict(self, batch, just_enc=False): method _add_encoder (line 76) | def _add_encoder(self, encoder_inputs, seq_len): method _reduce_states (line 97) | def _reduce_states(self, fw_st, bw_st): method _add_decoder (line 124) | def _add_decoder(self, inputs): method _calc_final_dist (line 146) | def _calc_final_dist(self, vocab_dists, attn_dists): method _add_emb_vis (line 185) | def _add_emb_vis(self, embedding_var): method _add_seq2seq (line 199) | def _add_seq2seq(self): method _add_train_op (line 288) | def _add_train_op(self): method build_graph (line 309) | def build_graph(self): method run_train_step (line 323) | def run_train_step(self, sess, batch): method run_eval_step (line 336) | def run_eval_step(self, sess, batch): method run_encoder (line 348) | def run_encoder(self, sess, batch): method decode_onestep (line 368) | def decode_onestep(self, sess, batch, latest_tokens, enc_states, dec_i... function _mask_and_avg (line 447) | def _mask_and_avg(values, padding_mask): function _coverage_loss (line 464) | def _coverage_loss(attn_dists, padding_mask): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/run_summarization.py function calc_running_avg_loss (line 83) | def calc_running_avg_loss(loss, running_avg_loss, summary_writer, step, ... function restore_best_model (line 110) | def restore_best_model(): function convert_to_coverage_model (line 135) | def convert_to_coverage_model(): function setup_training (line 159) | def setup_training(model, batcher): function run_training (line 190) | def run_training(model, batcher, sess_context_manager, sv, summary_writer): function run_eval (line 228) | def run_eval(model, batcher, vocab): function main (line 275) | def main(unused_argv): FILE: P007PytorchPointerGeneratorNetwork/pointer-generator/util.py function get_config (line 24) | def get_config(): function load_ckpt (line 30) | def load_ckpt(saver, sess, ckpt_dir="train"): FILE: P010Model/model_transformer.py class EncoderDecoder (line 22) | class EncoderDecoder(nn.Module): method __init__ (line 26) | def __init__(self, encoder, decoder, src_embed, tgt_embed, generator): method forward (line 34) | def forward(self, src, tgt, src_mask, tgt_mask): method encode (line 42) | def encode(self, src, src_mask): method decode (line 45) | def decode(self, memory, src_mask, tgt, tgt_mask): class Generator (line 49) | class Generator(nn.Module): method __init__ (line 54) | def __init__(self, d_model, vocab): method forward (line 58) | def forward(self, x): function clones (line 63) | def clones(module, N): class Encoder (line 71) | class Encoder(nn.Module): method __init__ (line 73) | def __init__(self, layer, N): method forward (line 78) | def forward(self, x, mask): class LayerNorm (line 84) | class LayerNorm(nn.Module): method __init__ (line 86) | def __init__(self, features, eps=1e-6): method forward (line 92) | def forward(self, x): class SublayerConnection (line 98) | class SublayerConnection(nn.Module): method __init__ (line 103) | def __init__(self, size, dropout): method forward (line 108) | def forward(self, x, sublayer): class EncoderLayer (line 112) | class EncoderLayer(nn.Module): method __init__ (line 114) | def __init__(self, size, self_attn, feed_forward, dropout): method forward (line 121) | def forward(self, x, mask): class Decoder (line 129) | class Decoder(nn.Module): method __init__ (line 131) | def __init__(self, layer, N): method forward (line 136) | def forward(self, x, memory, src_mask, tgt_mask): class DecoderLayer (line 142) | class DecoderLayer(nn.Module): method __init__ (line 144) | def __init__(self, size, self_attn, src_attn, feed_forward, dropout): method forward (line 152) | def forward(self, x, memory, src_mask, tgt_mask): function subsequent_mask (line 159) | def subsequent_mask(size): function attention (line 167) | def attention(query, key, value, mask=None, dropout=None): class MultiHeadedAttention (line 180) | class MultiHeadedAttention(nn.Module): method __init__ (line 181) | def __init__(self, h, d_model, dropout=0.1): method forward (line 192) | def forward(self, query, key, value, mask=None): method __init__ (line 289) | def __init__(self, h, d_model, dropout=0.1): method forward (line 300) | def forward(self, query, key, value, mask=None): class PositionwiseFeedForward (line 213) | class PositionwiseFeedForward(nn.Module): method __init__ (line 215) | def __init__(self, d_model, d_ff, dropout=0.1): method forward (line 221) | def forward(self, x): class Embeddings (line 225) | class Embeddings(nn.Module): method __init__ (line 226) | def __init__(self, d_model, vocab): method forward (line 231) | def forward(self, x): class PositionalEncoding (line 236) | class PositionalEncoding(nn.Module): method __init__ (line 238) | def __init__(self, d_model, dropout, max_len=5000): method forward (line 253) | def forward(self, x): function make_model (line 261) | def make_model(src_vocab, tgt_vocab, N=6, class MultiHeadedAttention (line 288) | class MultiHeadedAttention(nn.Module): method __init__ (line 181) | def __init__(self, h, d_model, dropout=0.1): method forward (line 192) | def forward(self, query, key, value, mask=None): method __init__ (line 289) | def __init__(self, h, d_model, dropout=0.1): method forward (line 300) | def forward(self, query, key, value, mask=None): class Batch (line 398) | class Batch(object): method __init__ (line 400) | def __init__(self, src, trg=None, pad=0): method make_std_mask (line 410) | def make_std_mask(tgt, pad): function run_epoch (line 427) | def run_epoch(data_iter, model, loss_compute, device): function batch_size_fn (line 462) | def batch_size_fn(new, count, sofar): class NoamOpt (line 490) | class NoamOpt(object): method __init__ (line 492) | def __init__(self, model_size, factor, warmup, optimizer): method step (line 500) | def step(self): method rate (line 509) | def rate(self, step = None): function get_std_opt (line 516) | def get_std_opt(model): class LabelSmoothing (line 543) | class LabelSmoothing(nn.Module): method __init__ (line 545) | def __init__(self, size, padding_idx, smoothing=0.0): method forward (line 554) | def forward(self, x, target): function data_gen (line 605) | def data_gen(V, batch, nbatches): class SimpleLossCompute (line 619) | class SimpleLossCompute(object): method __init__ (line 621) | def __init__(self, generator, criterion, opt=None): method __call__ (line 626) | def __call__(self, x, y, norm): FILE: named_entity_recognition/data.py function build_corpus (line 5) | def build_corpus(split, make_vocab=True, data_dir="./ResumeNER"): function build_map (line 34) | def build_map(lists): FILE: named_entity_recognition/evaluate.py function hmm_train_eval (line 11) | def hmm_train_eval(train_data, test_data, word2id, tag2id, remove_O=False): function crf_train_eval (line 36) | def crf_train_eval(train_data, test_data, remove_O=False): function bilstm_train_and_eval (line 55) | def bilstm_train_and_eval(train_data, dev_data, test_data, function ensemble_evaluate (line 83) | def ensemble_evaluate(results, targets, remove_O=False): FILE: named_entity_recognition/evaluating.py class Metrics (line 6) | class Metrics(object): method __init__ (line 9) | def __init__(self, golden_tags, predict_tags, remove_O=False): method cal_precision (line 33) | def cal_precision(self): method cal_recall (line 42) | def cal_recall(self): method cal_f1 (line 50) | def cal_f1(self): method report_scores (line 57) | def report_scores(self): method count_correct_tags (line 98) | def count_correct_tags(self): method _cal_weighted_average (line 110) | def _cal_weighted_average(self): method _remove_Otags (line 130) | def _remove_Otags(self): method report_confusion_matrix (line 147) | def report_confusion_matrix(self): FILE: named_entity_recognition/main.py function main (line 8) | def main(): FILE: named_entity_recognition/models/bilstm.py class BiLSTM (line 6) | class BiLSTM(nn.Module): method __init__ (line 7) | def __init__(self, vocab_size, emb_size, hidden_size, out_size): method forward (line 22) | def forward(self, sents_tensor, lengths): method test (line 34) | def test(self, sents_tensor, lengths, _): FILE: named_entity_recognition/models/bilstm_crf.py class BILSTM_Model (line 13) | class BILSTM_Model(object): method __init__ (line 14) | def __init__(self, vocab_size, out_size, crf=True): method train (line 52) | def train(self, word_lists, tag_lists, method train_step (line 85) | def train_step(self, batch_sents, batch_tags, word2id, tag2id): method validate (line 105) | def validate(self, dev_word_lists, dev_tag_lists, word2id, tag2id): method test (line 137) | def test(self, word_lists, tag_lists, word2id, tag2id): class BiLSTM_CRF (line 174) | class BiLSTM_CRF(nn.Module): method __init__ (line 175) | def __init__(self, vocab_size, emb_size, hidden_size, out_size): method forward (line 190) | def forward(self, sents_tensor, lengths): method test (line 203) | def test(self, test_sents_tensor, lengths, tag2id): FILE: named_entity_recognition/models/config.py class TrainingConfig (line 2) | class TrainingConfig(object): class LSTMConfig (line 10) | class LSTMConfig(object): FILE: named_entity_recognition/models/crf.py class CRFModel (line 6) | class CRFModel(object): method __init__ (line 7) | def __init__(self, method train (line 21) | def train(self, sentences, tag_lists): method test (line 25) | def test(self, sentences): FILE: named_entity_recognition/models/hmm.py class HMM (line 4) | class HMM(object): method __init__ (line 5) | def __init__(self, N, M): method train (line 20) | def train(self, word_lists, tag_lists, word2id, tag2id): method test (line 62) | def test(self, word_lists, word2id, tag2id): method decoding (line 69) | def decoding(self, word_list, word2id, tag2id): FILE: named_entity_recognition/models/util.py function word2features (line 7) | def word2features(sent, i): function sent2features (line 26) | def sent2features(sent): function tensorized (line 33) | def tensorized(batch, maps): function sort_by_lengths (line 50) | def sort_by_lengths(word_lists, tag_lists): function cal_loss (line 63) | def cal_loss(logits, targets, tag2id): function cal_lstm_crf_loss (line 88) | def cal_lstm_crf_loss(crf_scores, targets, tag2id): function indexed (line 155) | def indexed(targets, tagset_size, start_id): FILE: named_entity_recognition/test.py function main (line 14) | def main(): FILE: named_entity_recognition/utils.py function merge_maps (line 4) | def merge_maps(dict1, dict2): function save_model (line 12) | def save_model(model, file_name): function load_model (line 18) | def load_model(file_name): function extend_maps (line 27) | def extend_maps(word2id, tag2id, for_crf=True): function prepocess_data_for_lstmcrf (line 42) | def prepocess_data_for_lstmcrf(word_lists, tag_lists, test=False): function flatten_lists (line 52) | def flatten_lists(lists): FILE: word2vector/fasttext/fasttext.py function train_sentence_sg (line 43) | def train_sentence_sg(model, sentence, alpha, is_ft=False, work=None): function train_sentence_cbow (line 163) | def train_sentence_cbow(model, sentence, alpha, is_ft=False, work=None, ... class Vocab (line 284) | class Vocab(object): method __init__ (line 288) | def __init__(self, **kwargs): method __lt__ (line 305) | def __lt__(self, vocab): method __str__ (line 308) | def __str__(self): class FastText (line 315) | class FastText(SaveAndLoad): method __init__ (line 316) | def __init__(self, sentences=None, size=100, alpha=0.025, method get_latest_training_loss (line 384) | def get_latest_training_loss(self): method __reset_vocab (line 387) | def __reset_vocab(self): method build_vocab (line 395) | def build_vocab(self, sentences): method build_ngrams (line 426) | def build_ngrams(self): method reset_weights (line 452) | def reset_weights(self): method make_cum_table (line 475) | def make_cum_table(self, power=0.75, domain=2**31 - 1): method create_binary_tree (line 496) | def create_binary_tree(self): method train (line 536) | def train(self, sentences, total_words=None, word_count=0, chunksize=1... method __getitem__ (line 623) | def __getitem__(self, word): method __contains__ (line 632) | def __contains__(self, word): method similarity (line 636) | def similarity(self, w1, w2): method init_sims (line 648) | def init_sims(self): method most_similar (line 657) | def most_similar(self, positive=[], negative=[], topn=10): method word_vec (line 695) | def word_vec(self, word, use_norm=False): method compute_ngrams (line 723) | def compute_ngrams(self, word, min_n, max_n): method ft_hash (line 747) | def ft_hash(self, string): FILE: word2vector/fasttext/utils.py function zeros_aligned (line 22) | def zeros_aligned(shape, dtype, order='C', align=128): function chunkize_serial (line 30) | def chunkize_serial(iterable, chunksize, as_numpy=False): function expit (line 53) | def expit(x): function unitvec (line 57) | def unitvec(vec): function cossim (line 81) | def cossim(vec1, vec2): class RepeatCorpusNTimes (line 95) | class RepeatCorpusNTimes(object): method __init__ (line 104) | def __init__(self, corpus, n): method __iter__ (line 116) | def __iter__(self): class SaveAndLoad (line 122) | class SaveAndLoad(object): method __init__ (line 126) | def __init__(self): method save (line 129) | def save(self, fname): method load (line 135) | def load(cls, fname): class Text8Corpus (line 142) | class Text8Corpus(object): method __init__ (line 148) | def __init__(self, fname, sent_num=None, sent_len=1000): method __iter__ (line 156) | def __iter__(self): FILE: word2vector/fasttext/wget.py function filename_from_url (line 36) | def filename_from_url(url): function filename_from_headers (line 43) | def filename_from_headers(headers): function filename_fix_existing (line 72) | def filename_fix_existing(filename): function get_console_width (line 94) | def get_console_width(): function bar_thermometer (line 152) | def bar_thermometer(current, total, width=80): function bar_adaptive (line 166) | def bar_adaptive(current, total, width=80): function callback_progress (line 252) | def callback_progress(blocks, block_size, total_size, bar_function): class ThrowOnErrorOpener (line 282) | class ThrowOnErrorOpener(urllib.FancyURLopener): method http_error_default (line 283) | def http_error_default(self, url, fp, errcode, errmsg, headers): function download (line 286) | def download(url, out=None, bar=bar_adaptive): FILE: word2vector/glove/glove.py class Glove (line 42) | class Glove(SaveAndLoad): method __init__ (line 43) | def __init__(self, corpus=None, size=100, alpha=0.05, method build_vocab (line 99) | def build_vocab(self, corpus): method build_cooccurance_matrix (line 114) | def build_cooccurance_matrix(self, corpus): method iter_cooccurance_matrix (line 135) | def iter_cooccurance_matrix(self): method train (line 149) | def train(self, x_max=100, power=0.75): method reset_params (line 234) | def reset_params(self): method most_similar (line 246) | def most_similar(self, positive=[], negative=[], topn=10): method get_vocab (line 286) | def get_vocab(self): method get_embeddings (line 293) | def get_embeddings(self): FILE: word2vector/glove/utils.py function zeros_aligned (line 22) | def zeros_aligned(shape, dtype, order='C', align=128): function chunkize_serial (line 30) | def chunkize_serial(iterable, chunksize, as_numpy=False): function expit (line 53) | def expit(x): function unitvec (line 57) | def unitvec(vec): function cossim (line 81) | def cossim(vec1, vec2): class RepeatCorpusNTimes (line 95) | class RepeatCorpusNTimes(object): method __init__ (line 104) | def __init__(self, corpus, n): method __iter__ (line 116) | def __iter__(self): class SaveAndLoad (line 122) | class SaveAndLoad(object): method __init__ (line 126) | def __init__(self): method save (line 129) | def save(self, fname): method load (line 135) | def load(cls, fname): class Text8Corpus (line 142) | class Text8Corpus(object): method __init__ (line 148) | def __init__(self, fname, sent_num=None, sent_len=1000): method __iter__ (line 156) | def __iter__(self): FILE: word2vector/glove/wget.py function filename_from_url (line 36) | def filename_from_url(url): function filename_from_headers (line 43) | def filename_from_headers(headers): function filename_fix_existing (line 72) | def filename_fix_existing(filename): function get_console_width (line 94) | def get_console_width(): function bar_thermometer (line 152) | def bar_thermometer(current, total, width=80): function bar_adaptive (line 166) | def bar_adaptive(current, total, width=80): function callback_progress (line 252) | def callback_progress(blocks, block_size, total_size, bar_function): class ThrowOnErrorOpener (line 282) | class ThrowOnErrorOpener(urllib.FancyURLopener): method http_error_default (line 283) | def http_error_default(self, url, fp, errcode, errmsg, headers): function download (line 286) | def download(url, out=None, bar=bar_adaptive): FILE: word2vector/ngrams/lm.py class Test (line 45) | class Test(unittest.TestCase): method setUp (line 49) | def setUp(self): method tearDown (line 55) | def tearDown(self): method test_prob (line 58) | def test_prob(self): method test_perplexity (line 62) | def test_perplexity(self): function test (line 66) | def test(): FILE: word2vector/word2vec/utils.py function zeros_aligned (line 22) | def zeros_aligned(shape, dtype, order='C', align=128): function chunkize_serial (line 30) | def chunkize_serial(iterable, chunksize, as_numpy=False): function expit (line 53) | def expit(x): function unitvec (line 57) | def unitvec(vec): function cossim (line 81) | def cossim(vec1, vec2): class RepeatCorpusNTimes (line 95) | class RepeatCorpusNTimes(object): method __init__ (line 104) | def __init__(self, corpus, n): method __iter__ (line 116) | def __iter__(self): class SaveAndLoad (line 122) | class SaveAndLoad(object): method __init__ (line 126) | def __init__(self): method save (line 129) | def save(self, fname): method load (line 135) | def load(cls, fname): class Text8Corpus (line 142) | class Text8Corpus(object): method __init__ (line 148) | def __init__(self, fname, sent_num=None, sent_len=1000): method __iter__ (line 156) | def __iter__(self): FILE: word2vector/word2vec/wget.py function filename_from_url (line 36) | def filename_from_url(url): function filename_from_headers (line 43) | def filename_from_headers(headers): function filename_fix_existing (line 72) | def filename_fix_existing(filename): function get_console_width (line 94) | def get_console_width(): function bar_thermometer (line 152) | def bar_thermometer(current, total, width=80): function bar_adaptive (line 166) | def bar_adaptive(current, total, width=80): function callback_progress (line 252) | def callback_progress(blocks, block_size, total_size, bar_function): class ThrowOnErrorOpener (line 282) | class ThrowOnErrorOpener(urllib.FancyURLopener): method http_error_default (line 283) | def http_error_default(self, url, fp, errcode, errmsg, headers): function download (line 286) | def download(url, out=None, bar=bar_adaptive): FILE: word2vector/word2vec/word2vec.py function train_sentence_sg (line 44) | def train_sentence_sg(model, sentence, alpha, work=None): function train_sentence_cbow (line 134) | def train_sentence_cbow(model, sentence, alpha, work=None, cbow_mean=True): class Vocab (line 224) | class Vocab(object): method __init__ (line 228) | def __init__(self, **kwargs): method __lt__ (line 245) | def __lt__(self, vocab): method __str__ (line 248) | def __str__(self): class Word2Vec (line 254) | class Word2Vec(SaveAndLoad): method __init__ (line 255) | def __init__(self, sentences=None, size=100, alpha=0.025, method get_latest_training_loss (line 307) | def get_latest_training_loss(self): method __reset_vocab (line 311) | def __reset_vocab(self): method build_vocab (line 318) | def build_vocab(self, sentences): method reset_weights (line 347) | def reset_weights(self): method make_cum_table (line 367) | def make_cum_table(self, power=0.75, domain=2**31 - 1): method create_binary_tree (line 388) | def create_binary_tree(self): method train (line 428) | def train(self, sentences, total_words=None, word_count=0, chunksize=1... method __getitem__ (line 515) | def __getitem__(self, word): method __contains__ (line 524) | def __contains__(self, word): method similarity (line 528) | def similarity(self, w1, w2): method init_sims (line 540) | def init_sims(self): method most_similar (line 546) | def most_similar(self, positive=[], negative=[], topn=10): method accuracy (line 587) | def accuracy(self, questions, restrict_vocab=30000):