MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Methodmutable
(self)
hanlp/common/transform.py:180
Methodnaive_decode
(self, pred, mask, batch, decoder=None)
hanlp/components/srl/span_bio/span_bio.py:157
Methodnew_mlp
()
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:75
Methodnodes
Linearized nodes with varids replaced by instances
hanlp/components/amr/seq2seq/dataset/linearization.py:47
Methodnonempty_fields
Get the values of nonempty fields as a list.
plugins/hanlp_common/hanlp_common/conll.py:63
Methodnonempty_fields
Get the values of nonempty fields as a list.
plugins/hanlp_common/hanlp_common/conll.py:156
Methodnonzero_offsets
(y)
hanlp/components/eos/ngram.py:304
Methodnormalize_number
(text)
plugins/hanlp_common/hanlp_common/amr.py:732
Methodnormalize_text
(text: str)
hanlp/utils/lang/zh/char_table.py:23
Methodnum_samples_in
(self, dataset)
hanlp/components/parsers/biaffine_parser_tf.py:227
Methodon_config_ready
(self, **kwargs)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:490
Methodon_config_ready
(self, **kwargs)
hanlp/components/tokenizers/multi_criteria_cws_transformer.py:31
Methodon_config_ready
(self, **kwargs)
hanlp/components/parsers/biaffine/biaffine_dep.py:561
Methodon_config_ready
(self, **kwargs)
hanlp/components/parsers/biaffine/structual_attention.py:183
Methodon_config_ready
(self, **kwargs)
hanlp/components/classifiers/transformer_classifier.py:110
Methodon_config_ready
(self, transformer, max_seq_len, **kwargs)
hanlp/components/sts/transformer_sts.py:226
Methodon_config_ready
(self, **kwargs)
hanlp/components/mtl/multi_task_learning.py:650
Methodon_epoch_end
(self, epoch, logs=None)
hanlp/callbacks/fine_csv_logger.py:51
Methodon_train_begin
(self, logs=None)
hanlp/callbacks/fine_csv_logger.py:44
Methodon_train_begin
Callback before the training starts
hanlp/common/keras_component.py:425
Methodops
(self)
plugins/hanlp_common/hanlp_common/amr.py:233
Functionorthonormal_initializer
adopted from Timothy Dozat https://github.com/tdozat/Parser/blob/master/lib/linalg.py Args: output_size: input_size: Returns:
hanlp/components/srl/span_rank/layer.py:16
Methodoutput_dim
(self)
hanlp/layers/embeddings/contextual_string_embedding_tf.py:123
Methodoutput_size
(self)
hanlp/layers/crf/crf_tf.py:387
Methodpad_idx
(self)
hanlp/common/vocab_tf.py:156
Methodpad_idx
The index of ``PAD`` token.
hanlp/common/vocab.py:205
Methodparallelize
(self, devices: List[Union[int, torch.device]])
hanlp/components/mtl/multi_task_learning.py:769
MethodparseCoarse
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:50
MethodparseSentences
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:30
MethodparseText
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:23
MethodparseText
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/MeaningRepresentationTest.java:18
MethodparseTokens
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:40
Functionperformance_measure
Compute the performance metrics: TP, FP, FN, TN Args: y_true: 2d array. Ground truth (correct) target values. y_pred: 2d array. Estim
hanlp/metrics/chunking/sequence_labeling.py:290
Functionpkd_loss
* Computes normalized vector mse loss at position 0 along `length` dimension. This is the loss used in BERT-PKD, see `Patient Knowledge Distillat
hanlp/components/distillation/losses.py:176
Functionpost_process
(pred, amr_version)
hanlp/metrics/amr/smatch_eval.py:36
Functionpowerset
powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3) Args: iterable: Returns:
plugins/hanlp_common/hanlp_common/util.py:10
Methodpredict
(self, data: Any, **kwargs)
hanlp/components/lambda_wrapper.py:18
Methodpredict
(self, data: Union[str, List[str]], beautiful_amr_graph=True, **kwargs)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:380
Methodpredict
( self, data: Union[str, List[str]], num_beams=5, max_length=1024, beautiful_amr_graph
hanlp/components/amr/amrbart/bart_amr_generation.py:79
Methodpredict
( self, data: Union[str, List[str]], num_beams=5, max_length=1024, beautiful_amr_graph
hanlp/components/amr/amrbart/bart_amr_parser.py:80
Methodpredict
(self, sentence: Any, batch_size: int = None, **kwargs)
hanlp/components/tokenizers/tok.py:15
Methodpredict
(self, sents: Union[List[str], List[List[str]]], batch_size=32, **kwargs)
hanlp/components/taggers/rnn_tagger_tf.py:46
Methodpredict
(self, tokens: Any, batch_size: int = None, **kwargs)
hanlp/components/taggers/tagger.py:145
Methodpredict
(self, tokens: Any, batch_size: int = None, **kwargs)
hanlp/components/ner/rnn_ner.py:47
Methodpredict
(self, data: Union[List[str], List[List[str]]], batch_size: int = None, ret_tokens=True, **kwargs)
hanlp/components/ner/biaffine_ner/biaffine_ner.py:232
Methodpredict
(self, data: Union[str, List[str]], **kwargs)
hanlp/components/parsers/constituency/crf_constituency_parser.py:237
Methodpredict
(self, data: Union[List[str], List[List[str]]], batch_size: int = None, **kwargs)
hanlp/components/parsers/ud/ud_parser.py:155
Methodpredict
(self, data: Any, batch_size=None, batch_max_tokens=None, conll=True, **kwargs)
hanlp/components/parsers/biaffine/biaffine_dep.py:41
Methodpredict
Classify text. Args: text: A document or a list of documents. topk: ``True`` or ``int`` to return the top-k
hanlp/components/classifiers/transformer_regression_hf.py:66
Methodpredict
(self, data: Union[str, List[str]], batch_size: int = None, **kwargs)
hanlp/components/classifiers/transformer_classifier.py:321
Methodpredict
Classify text. Args: text: A document or a list of documents. topk: ``True`` or ``int`` to return the top-k
hanlp/components/classifiers/fasttext_classifier.py:41
Methodpredict
Classify text. Args: text: A document or a list of documents. topk: ``True`` or ``int`` to return the top-k
hanlp/components/classifiers/transformer_classifier_hf.py:66
Methodpredict
(self, masked_sents: Union[str, List[str]], batch_size=32, topk=10, **kwargs)
hanlp/components/lm/mlm.py:74
Methodpredict
Predict the similarity between sentence pairs. Args: data: Sentence pairs. batch_size: The number of samples in a ba
hanlp/components/sts/transformer_sts.py:170
Methodpredict
(self, data: Union[str, List[str]], batch_size: int = None, fmt='dict', **kwargs)
hanlp/components/srl/span_rank/span_rank.py:264
Methodpredict
(self, data: Union[str, List[str]], batch_size: int = None, **kwargs)
hanlp/components/srl/span_bio/span_bio.py:292
Methodpredict
Sentence split. Args: data: A paragraph or a list of paragraphs. batch_size: Number of samples per batch.
hanlp/components/eos/ngram.py:191
Methodpredict
Predict on data. Args: data: A sentence or a list of sentences. tasks: The tasks to predict. skip_tasks:
hanlp/components/mtl/multi_task_learning.py:459
Methodpredict
(self, data: Union[str, List[str]], batch_size: int = None, **kwargs)
hanlp/components/mtl/tasks/tok/reg_tok.py:65
Methodpredict
(self, data: str, **kwargs)
hanlp/layers/embeddings/fast_text.py:160
Methodpredict
Predict on data fed by user. Users shall avoid directly call this method since it is not guarded with ``torch.no_grad`` and will introduces un
hanlp/common/torch_component.py:617
Methodpredict
(self, data: Any, batch_size=None, **kwargs)
hanlp/common/keras_component.py:431
Methodpredict_batch
(self, batch, inputs=None)
hanlp/components/ner/ner_tf.py:22
Methodpredict_batch
(self, batch, inputs=None, conll=True, **kwargs)
hanlp/components/parsers/biaffine_parser_tf.py:338
Methodpredict_data
(self, data, batch_size, **kwargs)
hanlp/components/tokenizers/tok.py:26
Methodpredict_data
(self, data, batch_size, **kwargs)
hanlp/components/ner/rnn_ner.py:50
Methodprediction_to_human
(self, pred, vocab: List[str], batch, token=None)
hanlp/components/lemmatizer.py:38
Methodprediction_to_human
(self, pred, vocab, batch, rebuild_span=False)
hanlp/components/tokenizers/transformer.py:216
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/sdp.py:152
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/dep_2nd.py:109
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/pos.py:164
Methodprediction_to_result
(self, prediction: List, batch: Dict[str, Any])
hanlp/components/mtl/tasks/constituency.py:152
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/dep.py:152
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/amr.py:127
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/ud.py:134
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/lem.py:127
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/ner/biaffine_ner.py:103
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/ner/tag_ner.py:166
Methodprediction_to_result
(self, prediction: List, batch: Dict[str, Any])
hanlp/components/mtl/tasks/srl/bio_srl.py:125
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/srl/rank_srl.py:116
Methodprediction_to_result
(self, prediction: Dict[str, Any], batch: Dict[str, Any])
hanlp/components/mtl/tasks/tok/tag_tok.py:143
Methodpredictions_to_human
(self, predictions, outputs, data, use_pos, conll=True)
hanlp/components/parsers/biaffine/biaffine_sdp.py:139
Methodpredictions_to_human
(self, predictions, outputs, data, use_pos, conll=True)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:200
Methodprepare_decoder_input_ids_from_labels
(self, labels: torch.Tensor)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1421
Methodprepare_inputs_for_generation
( self, decoder_input_ids, past=None, attention_mask=None, head_mask=N
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1393
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, use_cache=None, **kwargs)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1874
Methodprf
(self)
hanlp/metrics/f1.py:21
Methodprojective
``True`` if this tree is projective.
plugins/hanlp_common/hanlp_common/conll.py:336
Functionprune_ner_tagset
(sample: dict, tagset: Union[set, Dict[str, str]])
hanlp/datasets/ner/loaders/json_ner.py:141
Functionrandperm
(n: int)
hanlp/components/parsers/alg_tf.py:23
Functionrandperm
(n: int)
hanlp/components/parsers/biaffine_tf/alg.py:23
Methodratio
(self)
hanlp/utils/io_util.py:662
Methodratio_percentage
(self)
hanlp/utils/time_util.py:85
Methodratio_width
(self)
hanlp/utils/time_util.py:186
Methodratio_width
(self)
hanlp/utils/io_util.py:666
Methodread_backr
(cls, string: str)
hanlp/components/amr/seq2seq/dataset/linearization.py:106
Functionregister_custom_cls
(custom_cls, name=None)
hanlp/utils/tf_util.py:118
Functionrel_argmax
Fix the relation prediction by heuristic rules Args: rel_probs(NDArray): seq_len x rel_size length: real sentence length ensure
hanlp/components/parsers/alg_tf.py:259
Functionrel_argmax
Fix the relation prediction by heuristic rules Args: rel_probs(NDArray): seq_len x rel_size length: real sentence length ensure
hanlp/components/parsers/biaffine_tf/alg.py:259
Methodreload_idx_to_token
(self, idx_to_token: List[str], pad_idx=0, unk_idx=1)
hanlp/common/vocab.py:361
← previousnext →2,601–2,700 of 2,968, ranked by callers