MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/srl/rank_srl.py:98
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/tok/tag_tok.py:116
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/tok/reg_tok.py:106
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/embeddings/fast_text_tf.py:84
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/embeddings/concat_embedding.py:31
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/embeddings/word2vec_tf.py:32
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/embeddings/word2vec_tf.py:194
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/embeddings/contextual_string_embedding_tf.py:133
Methodcompute_mask
(self, inputs, mask=None)
hanlp/layers/crf/crf_layer_tf.py:82
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/weight_normalization.py:160
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/embeddings/fast_text_tf.py:60
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/embeddings/char_cnn_tf.py:45
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/embeddings/concat_embedding.py:55
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/embeddings/word2vec_tf.py:41
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/embeddings/contextual_string_embedding_tf.py:130
Methodcompute_output_shape
(self, input_shape)
hanlp/layers/crf/crf_layer_tf.py:164
Functioncompute_span_f1
(gold_data, predictions, task_name)
hanlp/components/srl/span_rank/srl_eval_utils.py:104
Functioncompute_unlabeled_span_f1
(gold_data, predictions, task_name)
hanlp/components/srl/span_rank/srl_eval_utils.py:130
Methodcondense
(block_, extras_=None)
plugins/hanlp_common/hanlp_common/document.py:218
Methodconfig
(self)
hanlp/common/transform.py:244
Methodconfig
The config of this object, which are public properties. If any properties needs to be excluded from this config, simply declare it wi
plugins/hanlp_common/hanlp_common/configurable.py:37
Methodconfig
(self)
plugins/hanlp_trie/hanlp_trie/dictionary.py:152
Methodconfig
(self)
plugins/hanlp_trie/hanlp_trie/dictionary.py:178
Methodconfusion_matrix
(self)
hanlp/metrics/chunking/chunking_f1.py:135
Functionconnect_graph_if_not_connected
(graph)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:576
Functionconnect_graph_if_not_connected
(graph)
hanlp/components/amr/amrbart/common/postprocessing.py:453
Functionconstant_temperature_scheduler
Remember to detach logits_S
hanlp/components/distillation/schedulers.py:19
Functionconsume_keys_from_dict
(keys: Iterable, d: dict)
plugins/hanlp_common/hanlp_common/util.py:45
Methodconvert
(self, token)
hanlp/common/transform.py:550
Methodconvert
(k, v)
hanlp/common/torch_component.py:341
Functionconvert_conll03_to_json
(file_path)
hanlp/datasets/ner/loaders/json_ner.py:92
Methodcopy_from
(self, item: dict)
hanlp/common/vocab.py:428
Methodcopy_from
(self, item: dict)
hanlp/common/vocab.py:464
Methodcopy_from
(self, item)
plugins/hanlp_common/hanlp_common/structure.py:87
MethodcoreferenceResolutionText
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:91
MethodcoreferenceResolutionTokens
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:98
MethodcoreferenceResolutionTokensWithSpeakers
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:108
Methodcorrect_multiroot
(heads)
plugins/hanlp_common/hanlp_common/amr.py:743
Functioncos_loss
* Computes the cosine similarity loss between the inputs. This is the loss used in DistilBERT, see `DistilBERT <https://arxiv.org/abs/1910.01108>
hanlp/components/distillation/losses.py:153
Methodcreate_conv1d
(filter, name)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:96
Methodcreate_custom_forward
(module)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:833
Methodcreate_custom_forward
(module)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1079
Functioncreate_label_vocab
()
hanlp/common/vocab.py:505
Methodcreate_model
(self, pretrained_embed, transformer)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:122
Functioncreate_optimizer
Creates an optimizer with learning rate schedule. Args: init_lr: num_train_steps: num_warmup_steps: Returns:
hanlp/optimizers/adamw/optimization.py:68
Functioncreate_sp_label
(sample: dict)
hanlp/datasets/qa/hotpotqa.py:82
Methodcreate_types_shapes_values
(self)
hanlp/components/taggers/cnn_tagger_tf.py:25
Methodcreate_types_shapes_values
(self)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:47
Methodcreate_types_shapes_values
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:56
Methodcreate_types_shapes_values
(self)
hanlp/components/classifiers/transformer_classifier_tf.py:74
Methodcreate_types_shapes_values
(self)
hanlp/transform/conll_tf.py:203
Methodcreate_types_shapes_values
(self)
hanlp/transform/conll_tf.py:362
Methodcreate_types_shapes_values
(self)
hanlp/transform/conll_tf.py:771
Methodcreate_types_shapes_values
(self)
hanlp/transform/tacred_tf.py:85
Methodcreate_types_shapes_values
(self)
hanlp/transform/tsv_tf.py:101
Methodcreate_types_shapes_values
(self)
hanlp/transform/table_tf.py:79
Methodcreate_types_shapes_values
(self)
hanlp/transform/text_tf.py:42
Functioncrf_multitag_sequence_score
Computes the unnormalized score of all tag sequences matching tag_bitmap. tag_bitmap enables more than one tag to be considered correct a
hanlp/layers/crf/crf_tf.py:75
Functionctb_pos_to_text_format
Convert ctb pos tagging corpus from tsv format to text format, where each word is followed by its pos tag. Args: path: File to be
hanlp/datasets/parsing/loaders/_ctb_utils.py:294
Methodcustom_forward
(*inputs)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:834
Methodcustom_forward
(*inputs)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1080
Functioncwsm_temperature_scheduler
(logits_S, logits_T, base_temperature)
hanlp/components/distillation/schedulers.py:49
Functiondataset_from_tsv
(tsv_file_path, word_vocab: VocabTF, char_vocab: VocabTF, tag_vocab: VocabTF, batch_size=32,
hanlp/transform/tsv_tf.py:19
Functiondataset_from_txt
(txt_file_path: str, char_vocab: VocabTF, ngram_vocab: VocabTF, tag_vocab: VocabTF, bigra
hanlp/transform/txt_tf.py:121
Methoddataset_iterator
An iterator over the entire dataset, yielding all sentences processed.
hanlp/datasets/srl/loaders/ontonotes_loader.py:181
Methoddecode
(self, arc_scores, rel_scores, mask)
hanlp/components/parsers/biaffine_parser_tf.py:383
Methoddecode
(self, arc_scores, rel_scores, mask)
hanlp/components/parsers/biaffine_parser_tf.py:566
Methoddecode
r""" Args: s_span (~torch.Tensor): ``[batch_size, seq_len, seq_len]``. Scores of all spans. s_label (~
hanlp/components/parsers/constituency/crf_constituency_model.py:174
Methoddecode
(self, output_dict: Dict[str, torch.Tensor])
hanlp/components/parsers/ud/ud_model.py:135
Methoddecode
(self, arc_scores, rel_scores, mask, batch=None)
hanlp/components/parsers/biaffine/biaffine_sdp.py:106
Methoddecode_amr
(self, tokens, restore_name_ops=False)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:223
Methoddecode_amr
(self, tokens, restore_name_ops=None)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:635
Methoddecode_amr
(self, tokens, restore_name_ops=None)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:630
Functiondecode_into_node_and_backreferences
(subtoken_ids, tokenizer)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:31
Functiondecode_into_node_and_backreferences
(subtoken_ids, tokenizer)
hanlp/components/amr/amrbart/common/postprocessing.py:55
Functiondecode_into_node_and_backreferences_without_space
(subtoken_ids, tokenizer)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:191
Methoddecode_lemma
(word, rule)
hanlp/components/parsers/ud/tag_decoder.py:124
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/sdp.py:91
Methoddecode_output
(self, output: Dict[str, Any], batch: Dict[str, Any], decoder, **kwargs)
hanlp/components/mtl/tasks/dep_2nd.py:79
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/pos.py:140
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/constituency.py:121
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/__init__.py:117
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/dep.py:90
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/amr.py:104
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any],
hanlp/components/mtl/tasks/ud.py:97
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/lem.py:103
Methoddecode_output
(self, output: Dict[str, Any], mask: torch.BoolTensor,
hanlp/components/mtl/tasks/ner/biaffine_ner.py:61
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/ner/tag_ner.py:141
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/srl/bio_srl.py:85
Methoddecode_output
(self, output: Dict[str, Any], mask: torch.BoolTensor,
hanlp/components/mtl/tasks/srl/rank_srl.py:91
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any],
hanlp/components/mtl/tasks/tok/tag_tok.py:122
Methoddecode_output
(self, output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterable[torch.Tensor], Any]
hanlp/components/mtl/tasks/tok/reg_tok.py:95
Functiondecode_spans
Args: span_starts: [num_candidates,] span_scores: [num_candidates, num_labels] span_ends: labels_inv: Returns:
hanlp/components/srl/span_rank/inference_utils.py:7
Methoddefault
Special json encoder for numpy types See https://interviewbubble.com/typeerror-object-of-type-float32-is-not-json-serializable/ Args:
hanlp/utils/tf_util.py:203
Methoddevices
(self)
hanlp/layers/embeddings/fast_text.py:166
Methoddevices
The devices this component lives on.
hanlp/common/torch_component.py:574
Methoddfs
(node, relation, parent)
plugins/hanlp_common/hanlp_common/amr.py:506
Functiondfs_linearize_constituency
(sample: dict, tokenizer: PENMANBartTokenizer, remove_space=False)
hanlp/components/amr/seq2seq/dataset/dataset.py:127
Functiondfs_linearize_levi
(sample: dict, tokenizer: PENMANBartTokenizer, remove_space=False)
hanlp/components/amr/seq2seq/dataset/dataset.py:85
Functiondfs_linearize_rgcn
(sample: dict, tokenizer: PENMANBartTokenizer)
hanlp/components/amr/seq2seq/dataset/dataset.py:111
← previousnext →2,001–2,100 of 2,968, ranked by callers