MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Method__call__
(self, some_token: Union[str, List[str]])
hanlp/common/vocab_tf.py:180
Method__call__
(self, some_token: Union[str, Iterable[str]])
hanlp/common/vocab.py:244
Method__call__
It supports 3D arrays of tokens. Args: some_token: Tokens of 1D to 3D Returns: A list of indices.
hanlp/common/vocab.py:475
Method__call__
Predict on data fed by user. This method calls :meth:`~hanlp.common.torch_component.predict` but decorates it with ``torch.no_grad``.
hanlp/common/torch_component.py:634
Method__call__
A shortcut for :func:`~hanlp.common.component.predict`. Args: *args: Any type of data subject to sub-classes **k
hanlp/common/component.py:25
Method__call__
(self, sample: dict)
hanlp/datasets/qa/hotpotqa.py:31
Method__call__
(self, sample: dict)
hanlp/datasets/srl/ontonotes5/_utils.py:660
Method__call__
(self, sample: dict)
hanlp/datasets/srl/loaders/conll2012.py:201
Method__call__
(self, y_true, y_pred, sample_weight=None, **kwargs)
hanlp/losses/sparse_categorical_crossentropy.py:16
Method__call__
(self, y_true, y_pred, sample_weight=None, **kwargs)
hanlp/losses/sparse_categorical_crossentropy.py:36
Method__call__
(self, y_true, y_pred, sample_weight=None, **kwargs)
hanlp/losses/sparse_categorical_crossentropy.py:55
Method__call__
(self, sample: dict)
hanlp/transform/prepend_space.py:11
Method__call__
(self, sample: dict)
hanlp/transform/transformer_tokenizer.py:66
Method__call__
(self, sample: dict)
hanlp/transform/transformer_tokenizer.py:246
Method__call__
A shortcut of :meth:`~hanlp_restful.HanLPClient.parse`.
plugins/hanlp_restful/hanlp_restful/__init__.py:122
Method__contains__
(self, key: Union[str, int])
hanlp/common/vocab_tf.py:52
Method__contains__
(self, key: Union[str, int])
hanlp/common/vocab.py:67
Method__contains__
(self, key)
plugins/hanlp_trie/hanlp_trie/trie.py:69
Method__delitem__
Delete a task (and every resource it owns) from this component. Args: task_name: The name of the task to be deleted. Exa
hanlp/components/mtl/multi_task_learning.py:778
Method__delitem__
(self, key)
plugins/hanlp_trie/hanlp_trie/trie.py:88
Method__enter__
(self)
hanlp/utils/file_read_backwards/file_read_backwards.py:52
Method__enter__
(self)
plugins/hanlp_common/hanlp_common/util.py:171
Method__eq__
(self, other)
hanlp/metrics/metric.py:15
Method__eq__
(self, other)
plugins/hanlp_common/hanlp_common/amr.py:203
Method__exit__
Closes all opened its file handler and propagates all exceptions on exit.
hanlp/utils/file_read_backwards/file_read_backwards.py:55
Method__exit__
(self, exc_type, exc_val, exc_tb)
plugins/hanlp_common/hanlp_common/util.py:174
Method__float__
(self)
hanlp/components/distillation/schedulers.py:70
Method__float__
(self)
hanlp/metrics/metric.py:39
Method__ge__
(self, other)
hanlp/metrics/metric.py:18
Method__ge__
(self, other)
hanlp/metrics/parsing/labeled_f1.py:40
Method__ge__
(self, other)
hanlp/metrics/parsing/attachmentscore.py:54
Method__ge__
(self, other)
hanlp/metrics/parsing/labeled_score.py:35
Method__ge__
(self, other)
hanlp/metrics/parsing/labeled_f1_tf.py:40
Method__getattr__
(self, key)
plugins/hanlp_common/hanlp_common/structure.py:92
Method__getitem__
(self, task_name: str)
hanlp/components/mtl/multi_task_learning.py:775
Method__getitem__
(self, word: Union[str, List, tf.Tensor])
hanlp/layers/embeddings/word2vec_tf.py:95
Method__getitem__
Get the index-th sample in this dataset. Args: index: Either a integer index of a list of indices. Returns: Either a sa
hanlp/common/dataset.py:186
Method__getitem__
(self, key: Union[str, int, List])
hanlp/common/vocab_tf.py:39
Method__getitem__
Get the index/indices associated with a token or a list of tokens or vice versa. Args: key: ``str`` for token(s) and ``int`` for
hanlp/common/vocab.py:46
Method__gt__
(self, other)
hanlp/metrics/metric.py:21
Method__gt__
(self, other)
hanlp/metrics/parsing/labeled_f1.py:43
Method__gt__
(self, other)
hanlp/metrics/parsing/attachmentscore.py:57
Method__gt__
(self, other)
hanlp/metrics/parsing/labeled_score.py:38
Method__gt__
(self, other)
hanlp/metrics/parsing/labeled_f1_tf.py:43
Method__hash__
(self)
hanlp/datasets/qa/hotpotqa.py:128
Method__hash__
(self)
plugins/hanlp_common/hanlp_common/amr.py:200
Method__init__
(self, function: Callable)
hanlp/components/lambda_wrapper.py:11
Method__init__
(self, transform: TextTransform = None)
hanlp/components/rnn_language_model_tf.py:14
Method__init__
(self, *pipes: Pipe)
hanlp/components/pipeline.py:79
Method__init__
A transition based lemmatizer using transformer as encoder. Args: **kwargs: Predefined config.
hanlp/components/lemmatizer.py:24
Method__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, degenerated_to_sgd=True)
hanlp/components/amr/seq2seq/optim.py:10
Method__init__
(self, **kwargs)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:35
Method__init__
(self, *args, raw_graph=False, **kwargs)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:259
Method__init__
(self, data: Union[str, List], use_recategorization=False,
hanlp/components/amr/seq2seq/dataset/dataset.py:19
Method__init__
(self, *args, raw_graph=False, **kwargs)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:250
Method__init__
( self, use_pointer_tokens: bool = True, collapse_name_ops: bool = False,
hanlp/components/amr/seq2seq/dataset/linearization.py:134
Method__init__
(self, **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:26
Method__init__
(self, **kwargs)
hanlp/components/amr/amrbart/bart_amr_parser.py:29
Method__init__
(self, num_embeddings: int, embedding_dim: int)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:125
Method__init__
( self, embed_dim: int, num_heads: int, dropout: float = 0.0, is_decod
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:143
Method__init__
(self, config: BartConfig)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:288
Method__init__
(self, config: BartConfig)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:356
Method__init__
( self, input_dim: int, inner_dim: int, num_classes: int, pooler_dropo
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:475
Method__init__
(self, config: BartConfig, embed_tokens: Optional[nn.Embedding] = None)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:702
Method__init__
(self, config: BartConfig, embed_tokens: Optional[nn.Embedding] = None)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:877
Method__init__
(self, config: BartConfig)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1277
Method__init__
(self, config: BartConfig, **kwargs)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1443
Method__init__
(self, config)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1570
Method__init__
(self, config)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1691
Method__init__
(self, config)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1700
Method__init__
(self, vocab_file, merges_file, errors="replace", bos_token="<s>", eos_token="</s>", sep_token="</s>", cls_tok
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:36
Method__init__
(self)
hanlp/components/tokenizers/tok_tf.py:51
Method__init__
(self, transform: TransformerTokenizerTransform = None)
hanlp/components/tokenizers/tok_tf.py:89
Method__init__
r"""Transformer based implementation of "Effective Neural Solution for Multi-Criteria Word Segmentation" (:cite:`he2019effective`). It uses an
hanlp/components/tokenizers/multi_criteria_cws_transformer.py:18
Method__init__
A tokenizer using transformer tagger for span prediction. It features with 2 high performance dictionaries to handle edge cases in real appli
hanlp/components/tokenizers/transformer.py:23
Method__init__
(self, filters, num_tags, embed, dropout, kernels, **kwargs)
hanlp/components/taggers/cnn_tagger_tf.py:64
Method__init__
(self, transform: Transform = None)
hanlp/components/taggers/rnn_tagger_tf.py:19
Method__init__
An old-school tagger using non-contextualized embeddings and RNNs as context layer. Args: **kwargs: Predefined config.
hanlp/components/taggers/rnn_tagger.py:26
Method__init__
(self, word_embed: tf.keras.layers.Embedding, ngram_embed: tf.keras.layers.Embedding, filters,
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:85
Method__init__
(self, transform: NgramTransform = None)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:143
Method__init__
A shallow tagging model use transformer as decoder. Args: encoder: A pretrained transformer. num_labels: Size
hanlp/components/taggers/transformers/transformer_tagger.py:29
Method__init__
(self, tokenizer=None, config: SerializableDict = None, map
hanlp/components/taggers/transformers/transformer_transform_tf.py:16
Method__init__
(self, transformer: tf.keras.Model, *args, **kwargs)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:18
Method__init__
(self, name='sparse_categorical_accuracy', dtype=None, mask_value=0)
hanlp/components/taggers/transformers/metrics_tf.py:9
Method__init__
(self, embed: Union[nn.Embedding, int], rnn_input, rnn_hidd
hanlp/components/taggers/rnn/rnntaggingmodel.py:33
Method__init__
r"""A simple tagger using transformers and a linear layer with an optional CRF (:cite:`lafferty2001conditional`) layer for NER task. I
hanlp/components/ner/transformer_ner.py:20
Method__init__
(self, transform: TransformerTransform = None)
hanlp/components/ner/ner_tf.py:75
Method__init__
An old-school RNN tagger using word2vec or fasttext embeddings. Args: **kwargs: Predefined config.
hanlp/components/ner/rnn_ner.py:16
Method__init__
An implementation of Named Entity Recognition as Dependency Parsing (:cite:`yu-etal-2020-named`). It treats every possible span as a candidate
hanlp/components/ner/biaffine_ner/biaffine_ner.py:26
Method__init__
An implementation of the biaffine decoder in "Named Entity Recognition as Dependency Parsing" (:cite:`yu-etal-2020-named`). Args:
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:61
Method__init__
(self, n)
hanlp/components/parsers/parse_alg.py:96
Method__init__
Parameters ---------- prediction : numpy.ndarray a predicted dependency tree where prediction[dep_idx] = head_id
hanlp/components/parsers/alg_tf.py:94
Method__init__
(self, transform: CoNLL_SDP_Transform = None)
hanlp/components/parsers/biaffine_parser_tf.py:352
Method__init__
(self, transform: CoNLL_Transformer_Transform = None)
hanlp/components/parsers/biaffine_parser_tf.py:391
Method__init__
(self, transform: CoNLL_Transformer_Transform = None)
hanlp/components/parsers/biaffine_parser_tf.py:547
Method__init__
(self)
hanlp/components/parsers/constituency/treecrf.py:117
Method__init__
(self, n_labels, n_hidden=400, n_mlp_span=500,
hanlp/components/parsers/constituency/crf_constituency_model.py:97
Method__init__
Two-stage CRF Parsing (:cite:`ijcai2020-560`). Args: **kwargs: Predefined config.
hanlp/components/parsers/constituency/crf_constituency_parser.py:28
Method__init__
(self, input_dim, num_classes, label_smoothing: float = 0.0
hanlp/components/parsers/ud/tag_decoder.py:43
Method__init__
Universal Dependencies Parsing (lemmatization, features, PoS tagging and dependency parsing) implementation of "75 Languages, 1 Model: Parsing
hanlp/components/parsers/ud/ud_parser.py:36
← previousnext →1,301–1,400 of 2,968, ranked by callers