MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Method__init__
(self, hidden_size, n_mlp_arc, n_mlp_rel,
hanlp/components/parsers/ud/ud_model.py:52
Method__init__
Biaffine dependency parsing (:cite:`dozat:17a`).
hanlp/components/parsers/biaffine/biaffine_dep.py:34
Method__init__
(self, input_size, hidden_size, num_layers=1,
hanlp/components/parsers/biaffine/variationalbilstm.py:209
Method__init__
(self, hidden_size, n_mlp_arc, n_mlp_rel, mlp_dropout, n_rels, projeciton=None)
hanlp/components/parsers/biaffine/structual_attention.py:23
Method__init__
(self, config, transformer: PreTrainedModel = None, transfo
hanlp/components/parsers/biaffine/structual_attention.py:51
Method__init__
(self)
hanlp/components/parsers/biaffine/structual_attention.py:119
Method__init__
(self, n_in, n_out=1, bias_x=True, bias_y=True)
hanlp/components/parsers/biaffine/biaffine.py:54
Method__init__
r"""Implementation of "Stanford's graph-based neural dependency parser at the conll 2017 shared task" (:cite:`dozat2017stanford`) and "Establi
hanlp/components/parsers/biaffine/biaffine_sdp.py:21
Method__init__
(self, hidden_size, config)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:27
Method__init__
(self, config, pretrained_embed: torch.Tensor = None, transformer: PreTrainedModel = None, tr
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:65
Method__init__
(self)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:84
Method__init__
(self, config, pretrained_embed: torch.Tensor = None, trans
hanlp/components/parsers/biaffine/biaffine_model.py:19
Method__init__
(self, config, pretrained_embed: torch.Tensor = None, transformer: PreTrainedModel = None, tr
hanlp/components/parsers/biaffine/biaffine_model.py:211
Method__init__
(self, n_in, n_out, dropout=0, activation=True)
hanlp/components/parsers/biaffine/mlp.py:46
Method__init__
(self, n_in, n_out=1, bias_x=True, bias_y=True, trainable=True, name=None, dtype=None, dynamic=False,
hanlp/components/parsers/biaffine_tf/layers.py:10
Method__init__
Dropout on timesteps with bernoulli distribution
hanlp/components/parsers/biaffine_tf/layers.py:67
Method__init__
Dropout on the first two dimensions
hanlp/components/parsers/biaffine_tf/layers.py:100
Method__init__
Parameters ---------- prediction : numpy.ndarray a predicted dependency tree where prediction[dep_idx] = head_id
hanlp/components/parsers/biaffine_tf/alg.py:94
Method__init__
An implementation of T. Dozat and C. D. Manning, “Deep Biaffine Attention for Neural Dependency Parsing.,” ICLR, 2017. Although I have my
hanlp/components/parsers/biaffine_tf/model.py:11
Method__init__
(self, **kwargs)
hanlp/components/classifiers/transformer_regression_hf.py:18
Method__init__
(self, transformer: PreTrainedModel, num_labels: int, max_s
hanlp/components/classifiers/transformer_classifier.py:30
Method__init__
A classifier using transformer as encoder. Args: **kwargs: Passed to config.
hanlp/components/classifiers/transformer_classifier.py:131
Method__init__
(self)
hanlp/components/classifiers/fasttext_classifier.py:21
Method__init__
(self, **kwargs)
hanlp/components/classifiers/transformer_classifier_hf.py:18
Method__init__
(self, config: SerializableDict = None, map_x=False, map_y=True, x_columns=None, y_column=-1,
hanlp/components/classifiers/transformer_classifier_tf.py:19
Method__init__
(self, num_training_steps: int)
hanlp/components/distillation/schedulers.py:62
Method__init__
(self, base_temperature)
hanlp/components/distillation/schedulers.py:76
Method__init__
(self, scheduler_func, base_temperature)
hanlp/components/distillation/schedulers.py:100
Method__init__
(self, beta=1, base_temperature=8)
hanlp/components/distillation/schedulers.py:122
Method__init__
(self, name)
hanlp/components/distillation/losses.py:277
Method__init__
(self, **kwargs)
hanlp/components/lm/mlm.py:30
Method__init__
A simple Semantic Textual Similarity (STS) baseline which fine-tunes a transformer with a regression layer on top of it. Arg
hanlp/components/sts/transformer_sts.py:25
Method__init__
(self, context_layer_output_dim, label_space_size, config)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:29
Method__init__
(self, input_size, hidden_size, num_layers=1, batch_first=False, \ bidirectional=False, dropo
hanlp/components/srl/span_rank/highway_variational_lstm.py:123
Method__init__
An implementation of "Jointly Predicting Predicates and Arguments in Neural Semantic Role Labeling" (:cite:`he-etal-2018-jointly`). It generat
hanlp/components/srl/span_rank/span_rank.py:29
Method__init__
(self, features, eps=1e-8)
hanlp/components/srl/span_rank/layer.py:55
Method__init__
(self, input_size, dropout_rate=0.0)
hanlp/components/srl/span_rank/layer.py:68
Method__init__
(self, input_size, dropout_rate=0.0)
hanlp/components/srl/span_rank/layer.py:91
Method__init__
(self, input_size, hidden_size, activation=None)
hanlp/components/srl/span_rank/layer.py:110
Method__init__
(self, input_size, hidden_size)
hanlp/components/srl/span_rank/layer.py:183
Method__init__
(self, input_size, hidden_size)
hanlp/components/srl/span_rank/layer.py:226
Method__init__
(self, input_size, hidden_size, num_layers=1, batch_first=False, \ bidirectional=False, dropo
hanlp/components/srl/span_rank/layer.py:256
Method__init__
A span based Semantic Role Labeling task using BIO scheme for tagging the role of each token. Given a predicate and a token, it uses biaffine
hanlp/components/srl/span_bio/span_bio.py:35
Method__init__
(self, embed, encoder, num_labels: int, n_
hanlp/components/srl/span_bio/baffine_tagging.py:50
Method__init__
(self, char_vocab_size, embedding_size=128, rnn_type: str =
hanlp/components/eos/ngram.py:24
Method__init__
(self, training=True, tau: float = 0.8, **dataloaders)
hanlp/components/mtl/multi_task_learning.py:54
Method__init__
A multi-task learning (MTL) framework. It shares the same encoder across multiple decoders. These decoders can have dependencies on each othe
hanlp/components/mtl/multi_task_learning.py:95
Method__init__
r"""Implementation of "Stanford's graph-based neural dependency parser at the conll 2017 shared task" (:cite:`dozat2017stanford`) and "Establi
hanlp/components/mtl/tasks/sdp.py:25
Method__init__
(self, trn: str = None, dev: str = None, tst: str = None, sampler_builder: SamplerBuilder = None,
hanlp/components/mtl/tasks/dep_2nd.py:40
Method__init__
A simple tagger using a linear layer with an optional CRF (:cite:`lafferty2001conditional`) layer for any tagging tasks including PoS tagging
hanlp/components/mtl/tasks/pos.py:56
Method__init__
r"""Two-stage CRF Parsing (:cite:`ijcai2020-560`). Args: trn: Path to training set. dev: Path to dev set.
hanlp/components/mtl/tasks/constituency.py:28
Method__init__
A task in the multi-task learning framework Args: trn: Path to training set. dev: Path to dev set.
hanlp/components/mtl/tasks/__init__.py:29
Method__init__
Biaffine dependency parsing (:cite:`dozat:17a`). Args: trn: Path to training set. dev: Path to dev set. t
hanlp/components/mtl/tasks/dep.py:27
Method__init__
(self, trn: str = None, dev: str = None, tst: str = None,
hanlp/components/mtl/tasks/amr.py:33
Method__init__
r"""Universal Dependencies Parsing (lemmatization, features, PoS tagging and dependency parsing) implementation of "75 Languages, 1 Model: Par
hanlp/components/mtl/tasks/ud.py:26
Method__init__
Transition based lemmatization (:cite:`kondratyuk-straka-2019-75`). Args: trn: Path to training set. dev: Path to de
hanlp/components/mtl/tasks/lem.py:32
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/mtl/tasks/ner/biaffine_ner.py:25
Method__init__
r"""A simple tagger using a linear layer with an optional CRF (:cite:`lafferty2001conditional`) layer for NER task. It can utilize whitelist g
hanlp/components/mtl/tasks/ner/tag_ner.py:41
Method__init__
A span based Semantic Role Labeling task using BIO scheme for tagging the role of each token. Given a predicate and a token, it uses biaffine
hanlp/components/mtl/tasks/srl/bio_srl.py:24
Method__init__
r""" An implementation of "Jointly Predicting Predicates and Arguments in Neural Semantic Role Labeling" (:cite:`he-etal-2018-jointly`). It ge
hanlp/components/mtl/tasks/srl/rank_srl.py:23
Method__init__
Tokenization which casts a chunking problem into a tagging problem. This task has to create batch of tokens containing both [CLS] and [SEP] si
hanlp/components/mtl/tasks/tok/tag_tok.py:38
Method__init__
(self, in_features: int, out_features: int = 1, bias: bool = ...)
hanlp/components/mtl/tasks/tok/reg_tok.py:39
Method__init__
(self, tag_sequence=None)
hanlp/utils/span_util.py:252
Method__init__
(self, fmt=None, datefmt=None, style='%', enable=True)
hanlp/utils/log_util.py:17
Method__init__
(self, delta_seconds)
hanlp/utils/time_util.py:50
Method__init__
(self, total: int, out=sys.stdout)
hanlp/utils/time_util.py:66
Method__init__
(self, filepath)
hanlp/utils/io_util.py:641
Method__init__
Convention for the data. When read_buffer is not None, it represents contents of the file from `read_position` onwards that has n
hanlp/utils/file_read_backwards/buffer_work_space.py:16
Method__init__
Constructor for FileReadBackwards. Args: path: Path to the file to be read encoding (str): Encoding chunk
hanlp/utils/file_read_backwards/file_read_backwards.py:30
Method__init__
Constructor for FileReadBackwardsIterator Args: fp (File): A file that we wish to start reading backwards from encodi
hanlp/utils/file_read_backwards/file_read_backwards.py:84
Method__init__
(self)
hanlp/callbacks/fine_csv_logger.py:14
Method__init__
(self, p, r, f)
hanlp/metrics/f1.py:46
Method__init__
(self)
hanlp/metrics/spearman_correlation.py:49
Method__init__
(self, top_k: int = 1, tie_break: bool = False)
hanlp/metrics/accuracy.py:20
Method__init__
(self)
hanlp/metrics/accuracy.py:139
Method__init__
(self)
hanlp/metrics/parsing/labeled_f1.py:10
Method__init__
(self, eps=1e-12)
hanlp/metrics/parsing/attachmentscore.py:28
Method__init__
(self, eps=1e-5)
hanlp/metrics/parsing/labeled_score.py:10
Method__init__
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:9
Method__init__
(self, eps=1e-12)
hanlp/metrics/parsing/span.py:30
Method__init__
(self, do_confusion_matrix=False)
hanlp/metrics/chunking/chunking_f1.py:26
Method__init__
(self, tag_vocab: VocabTF, from_logits=True, name='f1', dtype=None, **kwargs)
hanlp/metrics/chunking/iobes_tf.py:12
Method__init__
(self)
hanlp/metrics/chunking/conlleval.py:32
Method__init__
(self, label_encoding='IOBES')
hanlp/metrics/chunking/conlleval.py:60
Method__init__
(self, tag_vocab: VocabTF, from_logits=True, suffix=False, name='f1', dtype=None, **kwargs)
hanlp/metrics/chunking/bmes_tf.py:12
Method__init__
(self, tag_vocab: VocabTF, from_logits=True, name='f1', dtype=None, **kwargs)
hanlp/metrics/chunking/chunking_f1_tf.py:13
Method__init__
(self, p=0.5, batch_first=True)
hanlp/layers/dropout.py:68
Method__init__
r""" For :math:`N` tensors, they use different dropout masks respectively. When :math:`N-M` of them are dropped, the remaining :math:`
hanlp/layers/dropout.py:101
Method__init__
(self, dropout_rate=0.5)
hanlp/layers/dropout.py:144
Method__init__
(self, mixture_range: Tuple[int, int], do_layer_norm: bool = False,
hanlp/layers/scalar_mix.py:146
Method__init__
(self, layer, data_init=True, **kwargs)
hanlp/layers/weight_normalization.py:64
Method__init__
(self, module)
hanlp/layers/time_distributed.py:26
Method__init__
( self, embedding_dim: int, num_filters: int, ngram_filter_sizes: Tuple[int, .
hanlp/layers/cnn_encoder.py:48
Method__init__
(self, input_dim: int, num_layers: int, hidden_dims: Union[int, List[int]], activations: Unio
hanlp/layers/feed_forward.py:12
Method__init__
( self, input_dim: int, num_layers: int, hidden_dims: Union[in
hanlp/layers/feedforward.py:54
Method__init__
(self, key)
hanlp/layers/embeddings/fast_text.py:53
Method__init__
An embedding layer for fastText (:cite:`bojanowski2017enriching`). Args: key: Field name. embedding_dim: Size of this
hanlp/layers/embeddings/fast_text.py:63
Method__init__
An embedding layer builder for fastText (:cite:`bojanowski2017enriching`). Args: src: Field name. filepath: Filepath
hanlp/layers/embeddings/fast_text.py:91
Method__init__
Toy example of Word2VecEmbedding. It simply returns the embedding of a given word Args: **kwargs:
hanlp/layers/embeddings/fast_text.py:117
Method__init__
(self, field: str, path: str, trainable=False)
hanlp/layers/embeddings/contextual_string_embedding.py:75
← previousnext →1,401–1,500 of 2,968, ranked by callers