MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Methodfinalize_document
(self, doc: Document, task_name: str)
hanlp/components/mtl/tasks/constituency.py:155
Methodfinalize_document
(self, doc: Document, task_name: str)
hanlp/components/mtl/tasks/ud.py:146
Functionfind_embedding_by_class
(embed: Embedding, cls)
hanlp/layers/embeddings/embedding.py:126
Methodfind_span_indexes
(self, span)
plugins/hanlp_common/hanlp_common/amr.py:123
Methodfinished
(self)
hanlp/utils/time_util.py:162
Methodfirst_token
(self)
hanlp/common/vocab_tf.py:219
Methodfirst_token
The first token in this vocab.
hanlp/common/vocab.py:305
Methodfit
(self, trn_data, dev_data, save_dir, forward=True, embedding=100, rnn_inpu
hanlp/components/rnn_language_model_tf.py:20
Methodfit
Args: trn_data: dev_data: save_dir: batch_size: epochs: transformer:
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:399
Methodfit
(self, trn_data: Any, dev_data: Any, save_dir: str, word_embed: Union[str, int, dict] = 200, ngram
hanlp/components/tokenizers/tok_tf.py:54
Methodfit
(self, trn_data, dev_data, save_dir, transformer, average_subwords=False, word_dropout: float = 0.2,
hanlp/components/tokenizers/multi_criteria_cws_transformer.py:80
Methodfit
Args: trn_data: Training set. dev_data: Development set. save_dir: The directory to save trained compone
hanlp/components/tokenizers/transformer.py:240
Methodfit
(self, trn_path: str, **kwargs)
hanlp/components/taggers/cnn_tagger_tf.py:17
Methodfit
(self, trn_data: Any, dev_data: Any, save_dir: str, embedding=200, window_radius=3, kernels=(1, 2,
hanlp/components/taggers/cnn_tagger_tf.py:112
Methodfit
(self, trn_data: str, dev_data: str = None, save_dir: str = None, embeddings=100, embedding_trainable=False,
hanlp/components/taggers/rnn_tagger_tf.py:24
Methodfit
(self, trn_data, dev_data, save_dir, batch_size=50, epochs=100, embed=100,
hanlp/components/taggers/rnn_tagger.py:167
Methodfit
(self, trn_data: Any, dev_data: Any, save_dir: str, word_embed: Union[str, int, dict] = 200, ngram
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:168
Methodfit
(self, trn_data, dev_data, save_dir, transformer,
hanlp/components/taggers/transformers/transformer_tagger.py:233
Methodfit
(self, trn_path: str, **kwargs)
hanlp/components/taggers/transformers/transformer_transform_tf.py:48
Methodfit
Fit component to training set. Args: trn_data: Training set. dev_data: Development set. save_dir: The dir
hanlp/components/ner/transformer_ner.py:123
Methodfit
(self, trn_data: Any, dev_data: Any, save_dir: str, word_embed: Union[str, int, dict] = 200, ngram
hanlp/components/ner/ner_tf.py:58
Methodfit
(self, trn_data, dev_data, save_dir, transformer, optimizer='adamw', learning_rate=5e-5, weight_decay_rate=0,
hanlp/components/ner/ner_tf.py:80
Methodfit
(self, trn_data, dev_data, save_dir, batch_size=50, epochs=100, embed=100, rnn_input=None, rnn_hidden=256,
hanlp/components/ner/rnn_ner.py:33
Methodfit
Args: trn_data: Path to training set. dev_data: Path to dev set. save_dir: The directory to save trained
hanlp/components/ner/biaffine_ner/biaffine_ner.py:271
Methodfit
(self, trn_data, dev_data, save_dir, n_embed=100, pretrained_embed=None, embed_dropout=.33, n_lstm
hanlp/components/parsers/biaffine_parser_tf.py:359
Methodfit
(self, trn_data, dev_data, save_dir, transformer, max_seq_length=256, transformer_dropout=.33, d_p
hanlp/components/parsers/biaffine_parser_tf.py:441
Methodfit
(self, trn_data, dev_data, save_dir, transformer, max_seq_length=256, transformer_dropout=.33, d_p
hanlp/components/parsers/biaffine_parser_tf.py:556
Methodfit
(self, trn_data, dev_data, save_dir, encoder, lr=5
hanlp/components/parsers/constituency/crf_constituency_parser.py:265
Methodfit
(self, trn_data, dev_data, save_dir, transformer: ContextualWo
hanlp/components/parsers/ud/ud_parser.py:185
Methodfit
(self, trn_data, dev_data, save_dir, feat=None, n_embed=100, pretrained_em
hanlp/components/parsers/biaffine/biaffine_dep.py:146
Methodfit
(self, trn_data, dev_data, save_dir, transformer=None, mask_prob=0.15, pro
hanlp/components/parsers/biaffine/structual_attention.py:129
Methodfit
(self, trn_data, dev_data, save_dir, feat=None, n_embed=100, pretrained_em
hanlp/components/parsers/biaffine/biaffine_sdp.py:153
Methodfit
(self, trn_data, dev_data, save_dir, feat=None, n_embed=100, pretrained_embed=None, transformer=None,
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:103
Methodfit
(self, trn_data, dev_data, save_dir, text_a_key=None, text_b_key=None, lab
hanlp/components/classifiers/transformer_classifier.py:356
Methodfit
(self, trn_data: Any, dev_data: Any, save_dir: str, transformer: str, max_length: int = 128, optim
hanlp/components/classifiers/transformer_classifier_tf.py:120
Methodfit
(self, trn_data, dev_data, save_dir, transformer, sent_a_col, sent_b_col,
hanlp/components/sts/transformer_sts.py:203
Methodfit
(self, trn_data, dev_data, save_dir, embed, contex
hanlp/components/srl/span_rank/span_rank.py:317
Methodfit
(self, trn_data, dev_data, save_dir, embed, encode
hanlp/components/srl/span_bio/span_bio.py:315
Methodfit
(self, trn_data, dev_data, save_dir, epochs=5, app
hanlp/components/eos/ngram.py:245
Methodfit
Fit to data, triggers the training procedure. For training set and dev set, they shall be local or remote files. Args: tr
hanlp/common/torch_component.py:189
Methodfit
(self, trn_path: str, **kwargs)
hanlp/transform/conll_tf.py:323
Methodfit
(self, trn_path: str, **kwargs)
hanlp/transform/conll_tf.py:678
Methodfit
(self, trn_path: str, **kwargs)
hanlp/transform/tacred_tf.py:39
Methodfit
(self, trn_path: str, **kwargs)
hanlp/transform/tsv_tf.py:85
Methodfit
(self, trn_path: str, **kwargs)
hanlp/transform/table_tf.py:68
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:60
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/amr/amrbart/bart_amr_parser.py:64
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/taggers/transformers/transformer_tagger.py:81
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/classifiers/transformer_regression_hf.py:51
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/classifiers/transformer_classifier_hf.py:51
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/lm/mlm.py:62
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/mtl/tasks/__init__.py:140
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/layers/embeddings/fast_text.py:144
Methodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/layers/embeddings/word2vec.py:204
Methodfit_dataloader
Fit onto a dataloader. Args: trn: Training set. criterion: Loss function. optimizer: Optimizer.
hanlp/common/torch_component.py:408
Methodfix_text
(linearized=linearized)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:603
Methodfix_text
(linearized=linearized)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:598
Methodfix_text
(linearized=linearized)
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:422
Functionflat_sentence
(sample: dict)
hanlp/datasets/qa/hotpotqa.py:75
Functionflsw_temperature_scheduler
(logits_S, logits_T, base_temperature)
hanlp/components/distillation/schedulers.py:31
MethodformatMessage
(self, record: LogRecord)
hanlp/utils/log_util.py:21
Methodforward
`input_ids_shape` is expected to be [bsz x seqlen].
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:131
Methodforward
Input shape: Batch x Time x Channel
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:173
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(seq_len, batch, embed_dim)` attention_mask (
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:304
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:382
Methodforward
(self, hidden_states: torch.Tensor)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:487
Methodforward
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:735
Methodforward
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:925
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked language mo
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1315
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1464
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1590
Methodforward
(self, *args, **kwargs)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1695
Methodforward
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1731
Methodforward
(self, lens: torch.LongTensor, input_ids, token_span, token_type_ids=None, batch=None)
hanlp/components/taggers/transformers/transformer_tagger.py:54
Methodforward
(self, batch: Dict[str, torch.Tensor] )
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:43
Methodforward
(self, contextualized_embeddings: torch.FloatTensor, batch: Dict[str, torch.Tensor], mask=None)
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:82
Methodforward
r""" Args: scores (~torch.Tensor): ``[batch_size, seq_len, seq_len]``. Scores of all possible constituents.
hanlp/components/parsers/constituency/treecrf.py:45
Methodforward
r""" Args: x (~torch.FloatTensor): ``[batch_size, seq_len, hidden_dim]``. Hidden states from encoder. Ret
hanlp/components/parsers/constituency/crf_constituency_model.py:119
Methodforward
r""" Args: batch (~dict): Batch of input data. Returns: ~torch.Tensor, ~torch.Tensor:
hanlp/components/parsers/constituency/crf_constituency_model.py:201
Methodforward
(self, encoded_text: torch.FloatTensor, mask: torch.LongTensor,
hanlp/components/parsers/ud/tag_decoder.py:63
Methodforward
(self, batch: Dict[str, torch.Tensor], mask, )
hanlp/components/parsers/ud/ud_model.py:43
Methodforward
(self, hidden, batch: Dict[str, torch.Tensor], mask)
hanlp/components/parsers/ud/ud_model.py:89
Methodforward
(self, embed, mask)
hanlp/components/parsers/biaffine/variationalbilstm.py:222
Methodforward
(self, x, mask)
hanlp/components/parsers/biaffine/structual_attention.py:35
Methodforward
(self, input_ids: torch.LongTensor, attention_mask=None, token
hanlp/components/parsers/biaffine/structual_attention.py:77
Methodforward
r""" Args: x (torch.Tensor): ``[batch_size, seq_len, n_in]``. y (torch.Tensor): ``[batch_size, seq_len, n_in]``.
hanlp/components/parsers/biaffine/biaffine.py:77
Methodforward
(self, x, mask)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:40
Methodforward
(self, x, mask=None, **kwargs: Any)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:56
Methodforward
(self, words=None, feats=None, input_ids=None,
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:72
Methodforward
(self, words, feats, input_ids, token_span, mask, lens)
hanlp/components/parsers/biaffine/biaffine_model.py:89
Methodforward
(self, words=None, feats=None, input_ids=None,
hanlp/components/parsers/biaffine/biaffine_model.py:221
Methodforward
r""" Args: x (~torch.Tensor): The size of each input feature is `n_in`. Returns: A tensor wit
hanlp/components/parsers/biaffine/mlp.py:68
Methodforward
(self, input_ids, attention_mask, token_type_ids)
hanlp/components/classifiers/transformer_classifier.py:40
Methodforward
(self, logits_S, logits_T)
hanlp/components/distillation/schedulers.py:104
Methodforward
(self, logits_S, logits_T)
hanlp/components/distillation/schedulers.py:109
Methodforward
(self, hidden_states, batch, mask=None)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:90
Methodforward
(self, input, masks, initial=None)
hanlp/components/srl/span_rank/highway_variational_lstm.py:206
Methodforward
(self, x)
hanlp/components/srl/span_rank/layer.py:61
Methodforward
(self, x)
hanlp/components/srl/span_rank/layer.py:83
Methodforward
(self, x)
hanlp/components/srl/span_rank/layer.py:102
← previousnext →2,201–2,300 of 2,968, ranked by callers