MCPcopy Create free account

hub / github.com/Happleasei/Chinese-Grammatical-error-diagnosis / functions

Functions1,299 in github.com/Happleasei/Chinese-Grammatical-error-diagnosis

↓ 58 callersMethodinit_weights
Initialize and prunes weights if needed.
BERT_CRF/models/transformers/modeling_utils.py:180
↓ 40 callersMethodfrom_pretrained
r""" Instantiates one of the base model classes of the library from a pre-trained model configuration. The model class to instantiate
BERT_CRF/models/transformers/modeling_auto.py:67
↓ 38 callersMethodload
(module, prefix='')
BERT_CRF/models/transformers/modeling_utils.py:402
↓ 24 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_albert.py:272
↓ 21 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_bert.py:319
↓ 21 callersFunctionprune_linear_layer
Prune a linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_grad=True.
BERT_CRF/models/transformers/modeling_utils.py:758
↓ 20 callersMethodupdate
labels_paths: [[],[],[],....] pred_paths: [[],[],[],.....] :param label_paths: :param pred_paths: :ret
BERT_CRF/metrics/ner_metrics.py:39
↓ 17 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_albert_bright.py:200
↓ 16 callersMethod_tie_or_clone_weights
Tie or clone module weights depending of weither we are using TorchScript or not
BERT_CRF/models/transformers/modeling_utils.py:120
↓ 15 callersFunctionprint_
(*args)
XLNET_BILSTM_CRF/prepro_utils.py:37
↓ 13 callersMethodshape
projection
BERT_CRF/models/transformers/modeling_xlm.py:153
↓ 12 callersFunctionbuild_corpus
读取数据
HMM/data.py:5
↓ 12 callersMethodconvert_tokens_to_ids
Converts a single token, or a sequence of tokens, (str/unicode) in a single integer id (resp. a sequence of ids), using the vocabulary.
BERT_CRF/models/transformers/tokenization_utils.py:661
↓ 12 callersFunctioncreate_int_feature
(values)
BERT_BILSTM_CRF/bert/run_classifier.py:492
↓ 12 callersFunctionhead_projection
Project hidden states to a specific head with a 4D-shape.
XLNET_BILSTM_CRF/modeling.py:80
↓ 12 callersMethodload_state_dict
(self, state_dict)
BERT_CRF/callback/optimizater/lookahead.py:60
↓ 11 callersMethod_read_tsv
Reads a tab separated value file.
BERT_BILSTM_CRF/bert/run_classifier.py:197
↓ 11 callersMethodstate_dict
(self)
BERT_CRF/callback/optimizater/lookahead.py:57
↓ 10 callersFunctioncreate_initializer
Creates a `truncated_normal_initializer` with the given range.
BERT_BILSTM_CRF/bert/modeling.py:375
↓ 10 callersMethodtokenize
(self, text)
BERT_BILSTM_CRF/bert/tokenization.py:170
↓ 10 callersMethodtrain
(self, word_lists, tag_lists, dev_word_lists, dev_tag_lists, word2id, tag2id)
BILSTM_CRF/bilstm_crf.py:52
↓ 9 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_distilbert.py:198
↓ 9 callersMethod_get_resized_embeddings
Build a resized Embedding Module from a provided token Embedding Module. Increasing the size will add newly initialized vectors at the en
BERT_CRF/models/transformers/modeling_utils.py:86
↓ 9 callersMethodencode
Converts a string in a sequence of ids (integer), using the tokenizer and vocabulary. Same as doing ``self.convert_tokens_to_ids(sel
BERT_CRF/models/transformers/tokenization_utils.py:691
↓ 9 callersMethodencode_file
(self, path, ordered=False, verbose=False, add_eos=True, add_double_eos=False)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:176
↓ 9 callersFunctionget_shape_list
Returns a list of the shape of tensor, preferring static dimensions. Args: tensor: A tf.Tensor object to find the shape of. expected_rank:
BERT_BILSTM_CRF/bert/modeling.py:895
↓ 8 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_xlnet.py:428
↓ 8 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_xlm.py:340
↓ 8 callersMethodclose
(self)
BERT_BILSTM_CRF/bert/run_squad.py:1093
↓ 8 callersMethodconvert_tokens_to_ids
(self, tokens)
BERT_BILSTM_CRF/bert/tokenization.py:178
↓ 8 callersMethoddecode
:param logits: [batch_size, num_steps, num_tags]float32, logits :param lengths: [batch_size]int32, real length of each sequence
BERT_BILSTM_CRF/model.py:219
↓ 8 callersFunctionget_tags
(path, tag, tag_map)
XLNET_BILSTM_CRF/utils.py:63
↓ 8 callersMethodsave_pretrained
Save a model and its configuration file to a directory, so that it can be re-loaded using the `:func:`~transformers.PreTrainedModel.from_
BERT_CRF/models/transformers/modeling_utils.py:206
↓ 8 callersMethodupdate
(self, val, n=1)
BERT_CRF/tools/common.py:273
↓ 8 callersMethodzero_grad
(self)
BERT_CRF/callback/optimizater/lookahead.py:54
↓ 7 callersMethod__init__
Conv1D layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2) Basically works like a Linear layer but the weights are
BERT_CRF/models/transformers/modeling_utils.py:443
↓ 7 callersMethoddecode
Converts a sequence of ids (integer) in a string, using the tokenizer and vocabulary with options to remove special tokens and clean
BERT_CRF/models/transformers/tokenization_utils.py:990
↓ 7 callersMethodtokenize
Basic Tokenization of a piece of text. Split on "white spaces" only, for sub-word tokenization, see WordPieceTokenizer. Args:
BERT_CRF/models/transformers/tokenization_bert.py:292
↓ 6 callersMethod__init__
(self, d_model, d_inner, dropout, pre_lnorm=False, layer_norm_epsilon=1e-5)
BERT_CRF/models/transformers/modeling_transfo_xl.py:197
↓ 6 callersMethod__init__
(self, n_state, config)
BERT_CRF/models/transformers/modeling_gpt2.py:204
↓ 6 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_roberta.py:165
↓ 6 callersMethod_compute_logit
(self, hidden, weight, bias, proj)
BERT_CRF/models/transformers/modeling_transfo_xl_utilities.py:78
↓ 6 callersMethod_init_weight
(self, weight)
BERT_CRF/models/transformers/modeling_transfo_xl.py:466
↓ 6 callersMethod_read_json
(self,input_file)
BERT_CRF/processors/utils_ner.py:73
↓ 6 callersMethod_read_text
(self,input_file)
BERT_CRF/processors/utils_ner.py:49
↓ 6 callersMethodconvert_tokens_to_ids
(self, tokens)
BERT_CRF/models/transformers/tokenization_albert.py:133
↓ 6 callersFunctioncreate_int_feature
(values)
BERT_BILSTM_CRF/bert/create_pretraining_data.py:169
↓ 6 callersFunctionencode_ids
(sp_model, text, sample=False)
XLNET_BILSTM_CRF/prepro_utils.py:106
↓ 6 callersFunctionget_entities
:param seq: :param id2label: :param markup: :return:
BERT_CRF/processors/utils_ner.py:179
↓ 6 callersMethodget_labels
See base class.
BERT_CRF/processors/ner_seq.py:173
↓ 6 callersMethodpredict
(self)
XLNET_BILSTM_CRF/main_xlnet_bilstm_crf.py:386
↓ 6 callersMethodsave_vocabulary
Save the tokenizer vocabulary and merge files to a directory.
BERT_CRF/models/transformers/tokenization_xlm.py:812
↓ 6 callersFunctionseed_everything
设置整个开发环境的seed :param seed: :param device: :return:
BERT_CRF/tools/common.py:43
↓ 6 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
BERT_CRF/callback/optimizater/sgdw.py:47
↓ 5 callersMethod__init__
(self, n_state, config)
BERT_CRF/models/transformers/modeling_openai.py:223
↓ 5 callersMethodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
BERT_BILSTM_CRF/bert/modeling.py:91
↓ 5 callersFunctionpositional_embedding
(pos_seq, inv_freq, bsz=None)
XLNET_BILSTM_CRF/modeling.py:41
↓ 5 callersMethodpositional_embedding
(pos_seq, inv_freq, bsz=None)
BERT_CRF/models/transformers/modeling_xlnet.py:667
↓ 5 callersFunctionprune_conv1d_layer
Prune a Conv1D layer (a model parameters) to keep only entries in index. A Conv1D work as a Linear layer (see e.g. BERT) but the weights are
BERT_CRF/models/transformers/modeling_utils.py:783
↓ 5 callersMethodrestore
(self)
BERT_CRF/callback/adversarial.py:37
↓ 5 callersFunctiontensorized
(batch, maps)
BILSTM_CRF/util.py:7
↓ 5 callersMethodtokenize
Tokenizes a piece of text.
BERT_BILSTM_CRF/bert/tokenization.py:196
↓ 4 callersMethod_init_bias
(self, bias)
BERT_CRF/models/transformers/modeling_transfo_xl.py:472
↓ 4 callersFunctioncached_path
Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and retur
BERT_CRF/models/transformers/file_utils.py:155
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
BERT_BILSTM_CRF/bert/tokenization.py:136
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
BERT_CRF/models/transformers/tokenization_albert.py:79
↓ 4 callersMethodcount_file
(self, path, verbose=False, add_eos=False)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:108
↓ 4 callersFunctiondropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepi
BERT_BILSTM_CRF/bert/modeling.py:344
↓ 4 callersFunctionencode_pieces
(sp_model, text, return_unicode=True, sample=False)
XLNET_BILSTM_CRF/prepro_utils.py:68
↓ 4 callersMethodevaluate
:param sess: session to run the model :param data: list of data :param id_to_tag: index to tag name :return: evalua
BERT_BILSTM_CRF/model.py:240
↓ 4 callersFunctionformat_result
(result, text, tag)
XLNET_BILSTM_CRF/utils.py:6
↓ 4 callersMethodget_sequence_output
Gets final hidden layer of encoder. Returns: float Tensor of shape [batch_size, seq_length, hidden_size] corresponding to the final h
BERT_BILSTM_CRF/bert/modeling.py:237
↓ 4 callersMethodin_cooldown
(self)
BERT_CRF/callback/lr_scheduler.py:327
↓ 4 callersFunctionis_torch_available
()
BERT_CRF/models/transformers/file_utils.py:75
↓ 4 callersMethodmoses_pipeline
(self, text, lang)
BERT_CRF/models/transformers/tokenization_xlm.py:590
↓ 4 callersFunctionpost_attention
Post-attention processing.
XLNET_BILSTM_CRF/modeling.py:90
↓ 4 callersFunctionrel_attn_core
Core relative positional attention operations.
XLNET_BILSTM_CRF/modeling.py:128
↓ 4 callersMethodrel_attn_core
Core relative positional attention operations.
BERT_CRF/models/transformers/modeling_xlnet.py:257
↓ 4 callersMethodxlnet_evaluate
(self, sess, tag)
XLNET_BILSTM_CRF/main_xlnet_bilstm_crf.py:346
↓ 3 callersMethod__init__
(self, config)
BERT_CRF/models/transformers/modeling_ctrl.py:269
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_BILSTM_CRF/bert/run_classifier.py:278
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_BILSTM_CRF/bert/run_classifier.py:318
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_BILSTM_CRF/bert/run_classifier.py:358
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_CRF/processors/ner_seq.py:179
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_CRF/processors/ner_seq.py:224
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_CRF/processors/ner_span.py:196
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
BERT_CRF/processors/ner_span.py:235
↓ 3 callersMethodadd_one_sentence
(self, ntokens, target)
XLNET_BILSTM_CRF/xlnet_data_utils.py:82
↓ 3 callersMethodapply_gradients
See base class.
BERT_BILSTM_CRF/bert/optimization.py:108
↓ 3 callersFunctionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
BERT_BILSTM_CRF/bert/tokenization.py:78
↓ 3 callersFunctioncreate_mapping
Create a mapping (item to ID / ID to item) from a dictionary. Items are ordered by decreasing frequency.
BERT_BILSTM_CRF/data_utils.py:29
↓ 3 callersFunctionevaluate
(iterable, options=None)
BERT_BILSTM_CRF/conlleval.py:62
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
BERT_BILSTM_CRF/bert/run_classifier.py:479
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
BERT_BILSTM_CRF/bert/run_classifier.py:509
↓ 3 callersFunctionget_argparse
()
BERT_CRF/tools/finetuning_argparse.py:3
↓ 3 callersMethodget_dev_examples
See base class.
BERT_CRF/processors/ner_seq.py:165
↓ 3 callersFunctionget_linear_schedule_with_warmup
Create a schedule with a learning rate that decreases linearly after linearly increasing during a warmup period.
BERT_CRF/callback/lr_scheduler.py:25
↓ 3 callersMethodget_pooled_output
(self)
BERT_BILSTM_CRF/bert/modeling.py:234
↓ 3 callersMethodget_test_examples
See base class.
BERT_CRF/processors/ner_seq.py:169
↓ 3 callersMethodget_train_examples
See base class.
BERT_CRF/processors/ner_seq.py:161
next →1–100 of 1,299, ranked by callers