Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Happleasei/Chinese-Grammatical-error-diagnosis
/ functions
Functions
1,299 in github.com/Happleasei/Chinese-Grammatical-error-diagnosis
⨍
Functions
1,299
◇
Types & classes
276
↓ 3 callers
Method
ids_tensor
Creates a random int32 tensor of the shape within the vocab size.
BERT_BILSTM_CRF/bert/modeling_test.py:147
↓ 3 callers
Function
init_logger
Example: >>> init_logger(log_file) >>> logger.info("abc'")
BERT_CRF/tools/common.py:20
↓ 3 callers
Function
is_tf_available
()
BERT_CRF/models/transformers/file_utils.py:78
↓ 3 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
BERT_BILSTM_CRF/bert/modeling.py:362
↓ 3 callers
Function
load_and_cache_examples
(args, task, tokenizer, data_type='train')
BERT_CRF/main_bert_span.py:324
↓ 3 callers
Function
load_and_cache_examples
(args, task, tokenizer, data_type='train')
BERT_CRF/main_bert_softmax.py:283
↓ 3 callers
Function
load_and_cache_examples
(args, task, tokenizer, data_type='train')
BERT_CRF/main_bert_crf.py:355
↓ 3 callers
Function
load_sentences
Load sentences. A line must contain at least a word and its tag. Sentences are separated by empty lines.
BERT_BILSTM_CRF/loader.py:15
↓ 3 callers
Method
plot
Plots the learning rate range test. Arguments: skip_start (int, optional): number of batches to trim from the start.
BERT_CRF/callback/lr_finder.py:301
↓ 3 callers
Method
post_attention
Post-attention processing.
BERT_CRF/models/transformers/modeling_xlnet.py:299
↓ 3 callers
Function
prepare_dataset
Prepare the dataset. Return a list of lists of dictionaries containing: - word indexes - word char indexes - tag indexes
BERT_BILSTM_CRF/loader.py:102
↓ 3 callers
Function
prepocess_data_for_lstmcrf
(word_lists, tag_lists, test=False)
HMM/utils.py:42
↓ 3 callers
Method
report_confusion_matrix
计算混淆矩阵
HMM/evaluating.py:140
↓ 3 callers
Method
report_scores
将结果用表格的形式打印出来,像这个样子: precision recall f1-score support avg/total
HMM/evaluating.py:57
↓ 3 callers
Function
reshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
BERT_BILSTM_CRF/bert/modeling.py:932
↓ 3 callers
Method
run_step
:param sess: session to run the batch :param is_train: a flag indicate if it is a train batch :param batch: a dict containing
BERT_BILSTM_CRF/model.py:202
↓ 3 callers
Function
sort_by_lengths
(word_lists, tag_lists)
BILSTM_CRF/util.py:24
↓ 3 callers
Method
split_heads
(self, x, k=False)
BERT_CRF/models/transformers/modeling_gpt2.py:172
↓ 3 callers
Method
split_heads
(self, x, k=False)
BERT_CRF/models/transformers/modeling_openai.py:196
↓ 3 callers
Method
split_into_heads
(self, x, batch_size)
BERT_CRF/models/transformers/modeling_ctrl.py:98
↓ 3 callers
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
BERT_CRF/callback/optimizater/adamw.py:31
↓ 3 callers
Method
tie_weights
Make sure we are sharing the input and output embeddings. Export to TorchScript can't handle parameter sharing so we are cloning them
BERT_CRF/models/transformers/modeling_ctrl.py:454
↓ 3 callers
Method
to_json_string
Serializes this instance to a JSON string.
BERT_CRF/processors/ner_seq.py:30
↓ 3 callers
Method
tokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the given voca
BERT_BILSTM_CRF/bert/tokenization.py:308
↓ 3 callers
Method
transpose_for_scores
(self, x)
BERT_CRF/models/transformers/modeling_bert.py:196
↓ 3 callers
Method
transpose_for_scores
(self, x)
BERT_CRF/models/transformers/modeling_albert.py:158
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
BERT_BILSTM_CRF/bert/tokenization.py:152
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
BERT_CRF/models/transformers/tokenization_albert.py:92
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
BERT_CRF/models/transformers/tokenization_bert.py:100
↓ 2 callers
Method
__creat_model
(self)
XLNET_BILSTM_CRF/main_xlnet_bilstm_crf.py:93
↓ 2 callers
Method
__init__
(self, config)
BERT_CRF/models/bert_for_ner.py:49
↓ 2 callers
Method
__init__
(self, config)
BERT_CRF/models/albert_for_ner.py:50
↓ 2 callers
Method
__init__
(self, hidden_size, num_classes)
BERT_CRF/models/layers/linears.py:28
↓ 2 callers
Method
__init__
( self, model, optimizer, criterion, device=None, memory_cache
BERT_CRF/callback/lr_finder.py:58
↓ 2 callers
Method
_check_for_scheduler
(self)
BERT_CRF/callback/lr_finder.py:222
↓ 2 callers
Method
_convert_id_to_token
(self, index)
BERT_CRF/models/transformers/tokenization_utils.py:980
↓ 2 callers
Method
_convert_token_to_id
(self, token)
BERT_CRF/models/transformers/tokenization_utils.py:688
↓ 2 callers
Method
_convert_token_to_id_with_added_voc
(self, token)
BERT_CRF/models/transformers/tokenization_utils.py:680
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
BERT_BILSTM_CRF/bert/run_squad.py:1023
↓ 2 callers
Method
_move_to_device
(self, inputs, labels)
BERT_CRF/callback/lr_finder.py:265
↓ 2 callers
Method
_reset
Resets wait counter and cooldown counter.
BERT_CRF/callback/lr_scheduler.py:284
↓ 2 callers
Method
_rms
(self, x)
BERT_CRF/callback/optimizater/adafactor.py:64
↓ 2 callers
Method
_set_batch_increment
(self)
BERT_CRF/callback/lr_scheduler.py:478
↓ 2 callers
Function
_strip_spaces
(text)
BERT_BILSTM_CRF/bert/run_squad.py:955
↓ 2 callers
Method
_tokenize
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based vocabulary or sub-words for sub-wo
BERT_CRF/models/transformers/tokenization_utils.py:652
↓ 2 callers
Method
_validate
(self, emissions: torch.Tensor, tags: Optional[torch.LongTensor] = None, m
BERT_CRF/models/layers/crf.py:138
↓ 2 callers
Method
add_symbol
(self, sym)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:213
↓ 2 callers
Method
add_tokens
Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to it with indices start
BERT_CRF/models/transformers/tokenization_utils.py:488
↓ 2 callers
Method
attack
(self)
BERT_CRF/callback/adversarial.py:28
↓ 2 callers
Function
bert_extract_item
(start_logits, end_logits)
BERT_CRF/processors/utils_ner.py:192
↓ 2 callers
Function
bilstm_train_and_eval
(train_data, dev_data, test_data, word2id, tag2id, crf=True, remove_O=False)
BILSTM/evaluate.py:15
↓ 2 callers
Method
bpe
(self, token)
BERT_CRF/models/transformers/tokenization_openai.py:115
↓ 2 callers
Method
build_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
BERT_CRF/models/transformers/tokenization_utils.py:928
↓ 2 callers
Function
build_map
(lists)
HMM/data.py:34
↓ 2 callers
Method
build_vocab
(self)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:155
↓ 2 callers
Function
calculate_metrics
(correct, guessed, total)
BERT_BILSTM_CRF/conlleval.py:149
↓ 2 callers
Method
compute
(self, origin, found, right)
BERT_CRF/metrics/ner_metrics.py:16
↓ 2 callers
Method
compute
(self, origin, found, right)
BERT_CRF/metrics/ner_metrics.py:68
↓ 2 callers
Function
compute_loss
(logits, positions)
BERT_BILSTM_CRF/bert/run_squad.py:646
↓ 2 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
BERT_BILSTM_CRF/bert/run_squad.py:309
↓ 2 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s `cls_token_at_end` define the location of the CLS token: - False (Default, BERT/XL
BERT_CRF/processors/ner_seq.py:68
↓ 2 callers
Method
convert_ids_to_tokens
Converts a single index or a sequence of indices (integers) in a token " (resp.) a sequence of tokens (str/unicode), using the vocabulary
BERT_CRF/models/transformers/tokenization_utils.py:958
↓ 2 callers
Function
convert_single_example
将一个样本进行分析,然后将字转化为id, 标签转化为lb
BERT_BILSTM_CRF/utils.py:247
↓ 2 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
BERT_BILSTM_CRF/bert/run_classifier.py:377
↓ 2 callers
Function
convert_tf_checkpoint_to_pytorch
(tf_checkpoint_path, bert_config_file, pytorch_dump_path)
BERT_CRF/tools/convert_albert_tf_checkpoint_to_pytorch.py:14
↓ 2 callers
Method
convert_to_tensor
(self, symbols)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:245
↓ 2 callers
Method
convert_tokens_to_string
Converts a sequence of tokens (string) in a single string. The most simple way to do it is ' '.join(self.convert_ids_to_tokens(token_ids)
BERT_CRF/models/transformers/tokenization_utils.py:983
↓ 2 callers
Function
create_dico
Create a dictionary of items from a list of list of items.
BERT_BILSTM_CRF/data_utils.py:13
↓ 2 callers
Method
decode
Find the most likely tag sequence using Viterbi algorithm. Args: emissions (`~torch.Tensor`): Emission score tensor of size
BERT_CRF/models/layers/crf.py:102
↓ 2 callers
Function
encode_pieces
turn sentences into word pieces.
BERT_CRF/models/transformers/tokenization_albert.py:28
↓ 2 callers
Function
end_of_chunk
(prev_tag, tag, prev_type, type_)
BERT_BILSTM_CRF/conlleval.py:233
↓ 2 callers
Function
evaluate
(sess, model, name, data, id_to_tag, logger)
BERT_BILSTM_CRF/main_BERT_bilstm_crf.py:97
↓ 2 callers
Function
evaluate
(args, model, tokenizer, prefix="")
BERT_CRF/main_bert_span.py:197
↓ 2 callers
Function
evaluate
(args, model, tokenizer, prefix="")
BERT_CRF/main_bert_softmax.py:177
↓ 2 callers
Function
evaluate
(args, model, tokenizer, prefix="")
BERT_CRF/main_bert_crf.py:216
↓ 2 callers
Function
extend_maps
(word2id, tag2id, for_crf=True)
HMM/utils.py:27
↓ 2 callers
Function
flatten_lists
(lists)
HMM/utils.py:52
↓ 2 callers
Method
get_all_encoder_layers
(self)
BERT_BILSTM_CRF/bert/modeling.py:246
↓ 2 callers
Method
get_batch
(self, i, bptt=None)
BERT_CRF/models/transformers/tokenization_transfo_xl.py:295
↓ 2 callers
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
BERT_BILSTM_CRF/bert/run_classifier.py:184
↓ 2 callers
Method
get_labels
Gets the list of labels for this data set.
BERT_BILSTM_CRF/bert/run_classifier.py:192
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. word is represented as tuple of symbols (symbols being variable-length strings)
BERT_CRF/models/transformers/tokenization_openai.py:50
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
BERT_CRF/models/transformers/tokenization_gpt2.py:91
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
BERT_CRF/models/transformers/tokenization_ctrl.py:49
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. word is represented as tuple of symbols (symbols being variable-length strings)
BERT_CRF/models/transformers/tokenization_xlm.py:415
↓ 2 callers
Method
get_test_examples
Gets a collection of `InputExample`s for prediction.
BERT_BILSTM_CRF/bert/run_classifier.py:188
↓ 2 callers
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
BERT_BILSTM_CRF/bert/run_classifier.py:180
↓ 2 callers
Method
init_mems
(self, data)
BERT_CRF/models/transformers/modeling_transfo_xl.py:657
↓ 2 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
BERT_BILSTM_CRF/bert/run_squad.py:687
↓ 2 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
BERT_BILSTM_CRF/bert/run_pretraining.py:324
↓ 2 callers
Method
iter_batch
(self, shuffle=False)
BERT_BILSTM_CRF/data_utils.py:316
↓ 2 callers
Function
json_to_text
将json list写入text文件中 :param file_path: :param data: :return:
BERT_CRF/tools/common.py:201
↓ 2 callers
Function
make_path
Make folders for training and evaluation
BERT_BILSTM_CRF/utils.py:83
↓ 2 callers
Function
metrics
(counts)
BERT_BILSTM_CRF/conlleval.py:157
↓ 2 callers
Method
pad_data
(self, data)
XLNET_BILSTM_CRF/xlnet_data_utils.py:118
↓ 2 callers
Function
parse_args
(argv)
BERT_BILSTM_CRF/conlleval.py:40
↓ 2 callers
Function
parse_tag
(t)
BERT_BILSTM_CRF/conlleval.py:57
↓ 2 callers
Function
positionwise_ffn
Position-wise Feed-forward Network.
XLNET_BILSTM_CRF/modeling.py:52
↓ 2 callers
Function
preprocess_text
(inputs, lower=False, remove_space=True, keep_accents=False)
XLNET_BILSTM_CRF/prepro_utils.py:49
↓ 2 callers
Function
printable_text
Returns text encoded in a way suitable for print or `tf.logging`.
XLNET_BILSTM_CRF/prepro_utils.py:14
← previous
next →
101–200 of 1,299, ranked by callers