MCPcopy Create free account

hub / github.com/AtmaHou/Seq2SeqDataAugmentationForLU / functions

Functions400 in github.com/AtmaHou/Seq2SeqDataAugmentationForLU

↓ 63 callersFunctionaeq
Assert all arguments have the same value
OpenNMT/onmt/Utils.py:1
↓ 8 callersFunctionget_file_tail
(task_name, split_rate)
run_gen_with_label.py:48
↓ 8 callersFunctionmake_embeddings
Make an Embeddings instance. Args: opt: the option in current environment. word_dict(Vocab): words dictionary. featur
OpenNMT/onmt/ModelConstructor.py:17
↓ 8 callersMethodppl
(self)
OpenNMT/onmt/Trainer.py:41
↓ 8 callersFunctionrefresh_config_file
(config_path='./config.json')
set_config.py:5
↓ 7 callersMethodaccuracy
(self)
OpenNMT/onmt/Trainer.py:38
↓ 7 callersMethodupdate
(self, stat)
OpenNMT/onmt/Trainer.py:33
↓ 6 callersFunctionget_slot_filling_data_from_cluster
(cluster_data_file)
source/Evaluate/slot_filling.py:102
↓ 6 callersMethodlog
(self, prefix, experiment, lr)
OpenNMT/onmt/Trainer.py:59
↓ 6 callersFunctionlow_case_tokenizer
(sentence, tree_bank=True)
source/AuxiliaryTools/nlp_tool.py:21
↓ 5 callersFunctiondiverse_score
calculate pairing score :param s: target str :param t: candidate str :return: score, edit distance, length penalty
source/AuxiliaryTools/diverse_score_demo.py:16
↓ 5 callersFunctionformat_and_output_conll_data
(file_path, results)
source/Evaluate/slot_filling.py:230
↓ 5 callersFunctionsentence_edit_distance
(s1, s2)
source/AuxiliaryTools/nlp_tool.py:7
↓ 5 callersFunctionsentence_edit_distance
(s1, s2)
source/AuxiliaryTools/diverse_score_demo.py:6
↓ 5 callersMethodstep
Compute gradients norm.
OpenNMT/onmt/Optim.py:40
↓ 4 callersMethod__init__
(self, num_layers, hidden_size, dropout, embeddings)
OpenNMT/onmt/modules/Transformer.py:72
↓ 4 callersMethod_check_args
(self, input, lengths=None, hidden=None)
OpenNMT/onmt/Models.py:16
↓ 4 callersMethodbackward
(self, grad_h, grad_last)
OpenNMT/onmt/modules/SRU.py:428
↓ 4 callersMethodbottle
(self, v)
OpenNMT/onmt/Loss.py:94
↓ 4 callersFunctioncheck_sru_requirement
Return True if check pass; if check fails and abort is True, raise an Exception, othereise return False.
OpenNMT/onmt/modules/SRU.py:36
↓ 4 callersMethoddeep_change_set_to_list_dict
(self, d)
source/Cluster/conll_format_clustering.py:305
↓ 4 callersFunctionevaluateAndShowAttention
(input_sentence)
source/Generation/seq2seq_translation_tutorial.py:858
↓ 4 callersMethodinit_decoder_state
(self, src, context, enc_hidden)
OpenNMT/onmt/Models.py:199
↓ 4 callersFunctionmake_encoder
Various encoder dispatcher function. Args: opt: the option in current environment. embeddings (Embeddings): vocab embeddings
OpenNMT/onmt/ModelConstructor.py:51
↓ 3 callersMethod__init__
Args: encoder(*Encoder): the various encoder. decoder(*Decoder): the various decoder. multigpu(bool): run
OpenNMT/onmt/Models.py:391
↓ 3 callersMethod__init__
(self, input_size, hidden_size, num_layers=2, dropout=0, rnn_dropout=0, bidi
OpenNMT/onmt/modules/SRU.py:555
↓ 3 callersMethod__init__
(self, embeddings_size, decoder_size, attention_size, output_size)
OpenNMT/onmt/modules/Gate.py:28
↓ 3 callersMethod__init__
(self, input_size, width=3, dropout=0.2, nopad=False)
OpenNMT/onmt/modules/Conv2Conv.py:26
↓ 3 callersMethod__init__
(self, name)
source/Generation/seq2seq_translation_tutorial.py:156
↓ 3 callersFunction_add_test
Adds a Test to TestModel according to settings Args: paramSetting: list of tuples of (param, setting) methodname: name of th
OpenNMT/test/test_models.py:131
↓ 3 callersFunctioncall_onmt
(task_name, param)
run_gen_with_label.py:118
↓ 3 callersFunctioncall_onmt
(task_name, param)
run_onmt_generation.py:215
↓ 3 callersFunctionevaluate
(encoder, decoder, sentence, max_length=MAX_LENGTH)
source/Generation/seq2seq_translation_tutorial.py:724
↓ 3 callersFunctionfind_closest_sent
(tgt_s, sent_set)
source/Evaluate/gen_eval.py:28
↓ 3 callersMethodforward
Args: src(FloatTensor): a sequence of source tensors with optional feature tensors of size (len x batch).
OpenNMT/onmt/Models.py:403
↓ 3 callersFunctiongenerate_data
(input_file_path, output_src_file_path, output_tgt_file_path)
run_gen_with_label.py:53
↓ 3 callersMethodget_batch
(self, sourceL=3, bsize=1)
OpenNMT/test/test_models.py:35
↓ 3 callersFunctionget_slot_filling_data_from_generation
(for_conll_file_path, ori_say_set, use_topx, refilled_only=False)
source/Evaluate/slot_filling.py:128
↓ 3 callersFunctionget_vars_maybe_avg
(namespace, var_names, training, polyak_decay)
OpenNMT/onmt/modules/WeightNorm.py:27
↓ 3 callersMethodget_vocab
(self)
OpenNMT/test/test_models.py:30
↓ 3 callersFunctionmake_decoder
Various decoder dispatcher function. Args: opt: the option in current environment. embeddings (Embeddings): vocab embeddings
OpenNMT/onmt/ModelConstructor.py:73
↓ 3 callersFunctionpeek
sequence: an iterator returns: the first thing returned by calling next() on the iterator and an iterator created by re-chaining that
OpenNMT/onmt/IO.py:241
↓ 3 callersMethodtrain
Called for each epoch to train.
OpenNMT/onmt/Trainer.py:95
↓ 3 callersFunctionuse_gpu
(opt)
OpenNMT/onmt/Utils.py:11
↓ 3 callersMethodvar
(a)
OpenNMT/onmt/Translator.py:114
↓ 3 callersFunctionvariableFromSentence
(lang, sentence)
source/Generation/seq2seq_translation_tutorial.py:518
↓ 3 callersFunctionvariable_from_sentence
(word_table, sentence)
source/AuxiliaryTools/nn_tool.py:28
↓ 2 callersMethod__init__
(self, in_features, out_features, init_scale=1., polyak_decay=0.9995)
OpenNMT/onmt/modules/WeightNorm.py:37
↓ 2 callersMethod__init__
(self, input_size, hidden_size, use_cuda, n_layers=1)
source/Generation/Seq2SeqModel.py:9
↓ 2 callersMethod_fix_enc_hidden
The encoder hidden is (layers*directions) x batch x dim. We need to convert it to layers x batch x (directions*dim).
OpenNMT/onmt/Models.py:190
↓ 2 callersMethodaddSentence
(self, sentence)
source/Generation/seq2seq_translation_tutorial.py:163
↓ 2 callersFunctionasMinutes
(s)
source/Generation/seq2seq_translation_tutorial.py:629
↓ 2 callersFunctionas_minutes
(s)
source/Generation/Training.py:74
↓ 2 callersMethodbuildTargetTokens
(self, pred, src, attn, copy_vocab)
OpenNMT/onmt/Translator.py:47
↓ 2 callersFunctioncandidate_num
(d)
source/ReFilling/re_filling.py:23
↓ 2 callersMethodcollapse_copy_scores
Given scores from an expanded dictionary corresponeding to a batch, sums together copies, with a dictionary word when it is a
OpenNMT/onmt/IO.py:390
↓ 2 callersFunctioncollect_features
(fields, side="src")
OpenNMT/onmt/IO.py:42
↓ 2 callersMethodcompute_loss
Compute the loss. Subclass must define this method. Args: batch: the current batch. output: the predict outpu
OpenNMT/onmt/Loss.py:42
↓ 2 callersMethoddrop_checkpoint
Called conditionally each epoch to save a snapshot.
OpenNMT/onmt/Trainer.py:173
↓ 2 callersMethodelapsed_time
(self)
OpenNMT/onmt/Trainer.py:44
↓ 2 callersFunctionevaluate
(encoder, decoder, sentence, input_word_table, output_word_table, max_length, use_cuda)
source/Generation/Evaluation.py:25
↓ 2 callersMethodforward
(self, input)
OpenNMT/onmt/modules/UtilClass.py:6
↓ 2 callersFunctionget_distinct_score
(target_set)
source/Evaluate/gen_eval.py:50
↓ 2 callersMethodget_dropout_mask_
(self, size, p)
OpenNMT/onmt/modules/SRU.py:549
↓ 2 callersMethodinitHidden
(self)
source/Generation/Seq2SeqModel.py:25
↓ 2 callersMethodinitHidden
(self)
source/Generation/seq2seq_translation_tutorial.py:354
↓ 2 callersMethodload_pretrained_vectors
(self, emb_file, fixed)
OpenNMT/onmt/modules/Embeddings.py:120
↓ 2 callersFunctionmake_loss_compute
This returns user-defined LossCompute object, which is used to compute loss in train/validate process. You can implement your own *LossCo
OpenNMT/train.py:120
↓ 2 callersMethodmake_shard_state
Make shard state dictionary for shards() to return iterable shards for efficient loss computation. Subclass must define this
OpenNMT/onmt/Loss.py:28
↓ 2 callersFunctionold_candidate_num
(d)
source/ReFilling/re_filling.py:16
↓ 2 callersFunctionprepare_data_to_conll_format
(config, task_name='navigate', split_rate=1, cluster_method='_intent', use_topx=10, refilled_only=False, pair_
source/Evaluate/slot_filling.py:252
↓ 2 callersFunctionre_filling
(config, task, target_file_name='navigate1_pred.txt', split_rate=1, slot_value_table='train', refill_only=Fals
source/ReFilling/re_filling.py:218
↓ 2 callersFunctionread_corpus_file
path: location of a src or tgt file truncate: maximum sequence length (0 for unlimited) yields: (word, features, nfeat) triples for each
OpenNMT/onmt/IO.py:72
↓ 2 callersFunctionreport_score
(name, score_total, words_total)
OpenNMT/translate.py:33
↓ 2 callersMethodscore
Additional term add to log probability
OpenNMT/onmt/Beam.py:147
↓ 2 callersFunctionshape_transform
Tranform the size of the tensors to fit for conv input.
OpenNMT/onmt/modules/Conv2Conv.py:20
↓ 2 callersMethodstats
Compute and return a Statistics object. Args: loss(Tensor): the loss computed by the loss criterion. scores(
OpenNMT/onmt/Loss.py:79
↓ 2 callersFunctionupdate_config
(data_root="/users4/ythou/Projects/TaskOrientedDialogue/data/", config_path="../../config.json")
source/AuxiliaryTools/ConfigTool.py:18
↓ 2 callersFunctionwrite_embeddings
(filename, dict, embeddings)
OpenNMT/tools/extract_embeddings.py:19
↓ 1 callersMethod__init__
(self, option_strings, dest, help=None, **kwargs)
OpenNMT/opts.py:337
↓ 1 callersMethod__init__
(self, generator, tgt_vocab)
OpenNMT/onmt/Loss.py:105
↓ 1 callersMethod__init__
(self, num_layers, input_size, rnn_size, dropout)
OpenNMT/onmt/modules/StackedRNN.py:39
↓ 1 callersMethod__init__
(self, word_vec_size, position_encoding, feat_merge, feat_vec_exponent, feat_vec_size, dropou
OpenNMT/onmt/modules/Embeddings.py:54
↓ 1 callersMethod__init__
(self, d_hid, eps=1e-3)
OpenNMT/onmt/modules/UtilClass.py:27
↓ 1 callersMethod__init__
(self, opt, src_dict, tgt_dict)
OpenNMT/onmt/modules/CopyGenerator.py:15
↓ 1 callersFunction_add_test
Adds a Test to TestData according to settings Args: paramSetting: list of tuples of (param, setting) methodname: name of the
OpenNMT/test/test_preprocess.py:59
↓ 1 callersMethod_build_rnn
Private helper for building standard decoder RNN.
OpenNMT/onmt/Models.py:278
↓ 1 callersMethod_get_attn_subsequent_mask
Get an attention mask to avoid using the subsequent info.
OpenNMT/onmt/modules/Transformer.py:170
↓ 1 callersMethod_runTarget
(self, batch, data)
OpenNMT/onmt/Translator.py:66
↓ 1 callersMethod_run_forward_pass
Private helper for running the specific RNN forward pass. Must be overriden by all subclasses. Args: input (LongT
OpenNMT/onmt/Models.py:214
↓ 1 callersMethod_setRate
(self, lr)
OpenNMT/onmt/Optim.py:36
↓ 1 callersMethodaddWord
(self, word)
source/Generation/seq2seq_translation_tutorial.py:167
↓ 1 callersMethodadd_sentence
(self, sentence)
source/Generation/PrepareData.py:20
↓ 1 callersMethodadd_word
(self, word)
source/Generation/PrepareData.py:24
↓ 1 callersMethodadvance
Given prob over words for every last beam `wordLk` and attention `attnOut`: Compute and update the beam search. Parameters:
OpenNMT/onmt/Beam.py:55
↓ 1 callersFunctionappearance_check
(result_file, test_what_file, in_what_file, top_x=1)
source/Evaluate/gen_eval.py:65
↓ 1 callersFunctionappearance_check
(test_what_file, in_what_file, top_x=1)
source/AuxiliaryTools/data_tool.py:54
↓ 1 callersMethodbeam_update
Update when beam advances.
OpenNMT/onmt/Models.py:446
↓ 1 callersFunctionbuild_model
(model_opt, opt, fields, checkpoint)
OpenNMT/train.py:243
↓ 1 callersFunctionbuild_optim
(model, checkpoint)
OpenNMT/train.py:255
next →1–100 of 400, ranked by callers