SYMBOL INDEX (99 symbols across 8 files) FILE: configuration_unilm.py class UnilmConfig (line 15) | class UnilmConfig(PretrainedConfig): method __init__ (line 46) | def __init__(self, FILE: dirty_recognize.py class dirty_reg (line 9) | class dirty_reg(object): method __init__ (line 10) | def __init__(self, path): method insert_new (line 14) | def insert_new(self, word_list): method build (line 18) | def build(self, path): method enumerateMatchList (line 25) | def enumerateMatchList(self, word_list): method match (line 30) | def match(self, query): FILE: interactive_conditional_samples.py function remove_dirty_sentence (line 17) | def remove_dirty_sentence(dirty_obj, sentence): function remove_multi_symbol (line 24) | def remove_multi_symbol(text): function top_k_top_p_filtering (line 30) | def top_k_top_p_filtering(logits, top_k=0, top_p=0.0, filter_value=-floa... function main (line 47) | def main(): FILE: modeling_unilm.py class BertSelfAttention (line 25) | class BertSelfAttention(nn.Module): method __init__ (line 26) | def __init__(self, config): method transpose_for_scores (line 43) | def transpose_for_scores(self, x): method forward (line 49) | def forward(self, hidden_states, attention_mask, history_states=None): class BertAttention (line 80) | class BertAttention(nn.Module): method __init__ (line 81) | def __init__(self, config): method forward (line 86) | def forward(self, input_tensor, attention_mask, history_states=None): class BertLayer (line 93) | class BertLayer(nn.Module): method __init__ (line 94) | def __init__(self, config): method forward (line 100) | def forward(self, hidden_states, attention_mask, history_states=None): class BertEncoder (line 108) | class BertEncoder(nn.Module): method __init__ (line 109) | def __init__(self, config): method forward (line 115) | def forward(self, hidden_states, attention_mask, output_all_encoded_la... class UnilmPreTrainedModel (line 139) | class UnilmPreTrainedModel(PreTrainedModel): method _init_weights (line 145) | def _init_weights(self, module): class UnilmModel (line 156) | class UnilmModel(UnilmPreTrainedModel): method __init__ (line 157) | def __init__(self, config): method get_extended_attention_mask (line 164) | def get_extended_attention_mask(self, input_ids, token_type_ids, atten... method forward (line 181) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class UnilmModelIncr (line 196) | class UnilmModelIncr(UnilmModel): method __init__ (line 197) | def __init__(self, config): method forward (line 200) | def forward(self, input_ids, token_type_ids, position_ids, attention_m... class LabelSmoothingLoss (line 219) | class LabelSmoothingLoss(_Loss): method __init__ (line 220) | def __init__(self, label_smoothing=0, tgt_vocab_size=0, ignore_index=0... method forward (line 236) | def forward(self, output, target): class UnilmForLM (line 248) | class UnilmForLM(UnilmPreTrainedModel): method __init__ (line 249) | def __init__(self, config): method tie_weights (line 266) | def tie_weights(self): method forward (line 270) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class UnilmForSeq2Seq (line 324) | class UnilmForSeq2Seq(UnilmPreTrainedModel): method __init__ (line 326) | def __init__(self, config): method tie_weights (line 339) | def tie_weights(self): method forward (line 346) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class UnilmForSeq2SeqDecode (line 392) | class UnilmForSeq2SeqDecode(UnilmPreTrainedModel): method __init__ (line 393) | def __init__(self, config, mask_word_id=0, method tie_weights (line 412) | def tie_weights(self): method forward (line 416) | def forward(self, input_ids, token_type_ids, position_ids, attention_m... method beam_search (line 468) | def beam_search(self, input_ids, token_type_ids, position_ids, attenti... class UnilmForSeq2SeqDecodeSample (line 699) | class UnilmForSeq2SeqDecodeSample(UnilmPreTrainedModel): method __init__ (line 700) | def __init__(self, config): method tie_weights (line 707) | def tie_weights(self): method forward (line 711) | def forward(self, input_ids, token_type_ids, attention_mask): FILE: run_train.py function _get_max_epoch_model (line 37) | def _get_max_epoch_model(output_dir): function main (line 50) | def main(): FILE: tokenization_unilm.py class UnilmTokenizer (line 26) | class UnilmTokenizer(BertTokenizer): class WhitespaceTokenizer (line 32) | class WhitespaceTokenizer(object): method tokenize (line 33) | def tokenize(self, text): FILE: trie.py class Trie (line 8) | class Trie: method __init__ (line 9) | def __init__(self): method insert (line 13) | def insert(self, word): method search (line 22) | def search(self, word): method startsWith (line 34) | def startsWith(self, pcurNodeix): method get_start (line 43) | def get_start(self, prefix): method enumerateMatch (line 63) | def enumerateMatch(self, word, space=""): FILE: utils_seq2seq.py function get_random_word (line 13) | def get_random_word(vocab_words): function batch_list_to_batch_tensors (line 18) | def batch_list_to_batch_tensors(batch): function _get_word_split_index (line 33) | def _get_word_split_index(tokens, st, end): function _expand_whole_word (line 44) | def _expand_whole_word(tokens, st, end): class Pipeline (line 53) | class Pipeline(): method __init__ (line 56) | def __init__(self): method init_skipgram_size_geo_list (line 68) | def init_skipgram_size_geo_list(self, p): method __call__ (line 78) | def __call__(self, instance): method get_masked_pos (line 81) | def get_masked_pos(self, tokens, n_pred, add_skipgram=False, mask_segm... method replace_masked_tokens (line 162) | def replace_masked_tokens(self, tokens, masked_pos): function truncate_tokens_pair (line 178) | def truncate_tokens_pair(tokens_a, tokens_b, max_len): function truncate_tokens_signle (line 188) | def truncate_tokens_signle(tokens_a, max_len): class Seq2SeqDataset (line 194) | class Seq2SeqDataset(torch.utils.data.Dataset): method __init__ (line 196) | def __init__(self, file, batch_size, tokenizer, max_len, short_samplin... method read_data (line 219) | def read_data(self, line, tokenizer): method __len__ (line 227) | def __len__(self): method __getitem__ (line 230) | def __getitem__(self, idx): method __iter__ (line 237) | def __iter__(self): class Preprocess4Seq2seq (line 246) | class Preprocess4Seq2seq(Pipeline): method __init__ (line 248) | def __init__(self, max_pred, mask_prob, vocab_words, indexer, max_len=... method __call__ (line 263) | def __call__(self, instance): class Preprocess4BiLM (line 374) | class Preprocess4BiLM(Pipeline): method __init__ (line 376) | def __init__(self, max_pred, mask_prob, vocab_words, indexer, max_len=... method __call__ (line 391) | def __call__(self, instance): class Preprocess4RightLM (line 509) | class Preprocess4RightLM(Pipeline): method __init__ (line 511) | def __init__(self, max_pred, mask_prob, vocab_words, indexer, max_len=... method __call__ (line 526) | def __call__(self, instance): class Preprocess4LeftLM (line 642) | class Preprocess4LeftLM(Pipeline): method __init__ (line 644) | def __init__(self, max_pred, mask_prob, vocab_words, indexer, max_len=... method __call__ (line 659) | def __call__(self, instance): class Preprocess4Seq2seqDecode (line 778) | class Preprocess4Seq2seqDecode(Pipeline): method __init__ (line 781) | def __init__(self, vocab_words, indexer, max_len=512, max_tgt_length=1... method __call__ (line 791) | def __call__(self, instance):