MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Methodbuild_model
(self, encoder_size, training=True, **kwargs)
hanlp/components/mtl/tasks/ner/tag_ner.py:157
Methodbuild_model
(self, encoder_size, training=True, **kwargs)
hanlp/components/mtl/tasks/srl/bio_srl.py:98
Methodbuild_model
(self, encoder_size, training=True, **kwargs)
hanlp/components/mtl/tasks/srl/rank_srl.py:103
Methodbuild_model
(self, encoder_size, training=True, **kwargs)
hanlp/components/mtl/tasks/tok/tag_tok.py:131
Methodbuild_model
(self, encoder_size, training=True, **kwargs)
hanlp/components/mtl/tasks/tok/reg_tok.py:62
Methodbuild_model
(self, training=True, **kwargs)
hanlp/layers/embeddings/fast_text.py:156
Methodbuild_model
(self, training=True, **kwargs)
hanlp/layers/embeddings/word2vec.py:216
Methodbuild_optimizer
(self, optimizer, learning_rate, clipnorm, **kwargs)
hanlp/components/rnn_language_model_tf.py:54
Methodbuild_optimizer
(self, trn, lr, epochs, gradient_accumulation, warmup_steps, weight_decay, **kwargs)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:119
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:47
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/amr/amrbart/bart_amr_parser.py:51
Methodbuild_optimizer
(self, optimizer, lr, **kwargs)
hanlp/components/taggers/tagger.py:26
Methodbuild_optimizer
(self, optimizer, learning_rate, epsilon, weight_decay_rate, clipnorm, use_amp, train_steps,
hanlp/components/taggers/transformers/transformer_tagger_tf.py:58
Methodbuild_optimizer
(self, trn, epochs, lr,
hanlp/components/ner/biaffine_ner/biaffine_ner.py:38
Methodbuild_optimizer
(self, optimizer, learning_rate, epsilon, weight_decay_rate, clipnorm, fp16, train_steps,
hanlp/components/parsers/biaffine_parser_tf.py:471
Methodbuild_optimizer
(self, trn, **kwargs)
hanlp/components/parsers/constituency/crf_constituency_parser.py:37
Methodbuild_optimizer
(self, trn, **kwargs)
hanlp/components/parsers/ud/ud_parser.py:90
Methodbuild_optimizer
(self, epochs, trn, gradient_accumulation, **kwargs)
hanlp/components/parsers/biaffine/biaffine_dep.py:235
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/classifiers/transformer_regression_hf.py:38
Methodbuild_optimizer
(self, trn, epochs, lr,
hanlp/components/classifiers/transformer_classifier.py:63
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/classifiers/transformer_classifier_hf.py:38
Methodbuild_optimizer
(self, optimizer, use_amp, train_steps, warmup_steps, **kwargs)
hanlp/components/classifiers/transformer_classifier_tf.py:159
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/lm/mlm.py:49
Methodbuild_optimizer
(self, trn, epochs, gradient_accumulation=1, lr=1e-3, transformer_lr=5e-5, adam_epsilon=1e-8,
hanlp/components/sts/transformer_sts.py:64
Methodbuild_optimizer
(self, trn, epochs, lr,
hanlp/components/srl/span_rank/span_rank.py:39
Methodbuild_optimizer
(self, trn, epochs, lr,
hanlp/components/srl/span_bio/span_bio.py:45
Methodbuild_optimizer
(self, **kwargs)
hanlp/components/eos/ngram.py:87
Methodbuild_optimizer
(self, trn, epochs, adam_epsilon,
hanlp/components/mtl/multi_task_learning.py:208
Methodbuild_optimizer
(self, decoder: torch.nn.Module, **kwargs)
hanlp/components/mtl/tasks/sdp.py:140
Methodbuild_optimizer
(self, decoder: torch.nn.Module, **kwargs)
hanlp/components/mtl/tasks/dep_2nd.py:98
Methodbuild_optimizer
(self, decoder: torch.nn.Module, **kwargs)
hanlp/components/mtl/tasks/__init__.py:102
Methodbuild_optimizer
(self, decoder: torch.nn.Module, **kwargs)
hanlp/components/mtl/tasks/dep.py:140
Methodbuild_optimizer
(self, **kwargs)
hanlp/layers/embeddings/fast_text.py:131
Methodbuild_optimizer
(self, **kwargs)
hanlp/layers/embeddings/word2vec.py:191
Methodbuild_sample
(self, tokens, deduplicated_srl, doc, sid)
hanlp/datasets/srl/loaders/conll2012.py:207
Methodbuild_samples
(self, data: List[str], criteria=None, **kwargs)
hanlp/components/tokenizers/multi_criteria_cws_transformer.py:57
Methodbuild_samples
(self, inputs, cls_is_bos=False, sep_is_eos=False)
hanlp/components/mtl/tasks/sdp.py:169
Methodbuild_samples
(self, inputs, cls_is_bos=False, sep_is_eos=False)
hanlp/components/mtl/tasks/constituency.py:168
Methodbuild_samples
(self, inputs, cls_is_bos=False, sep_is_eos=False)
hanlp/components/mtl/tasks/dep.py:165
Methodbuild_samples
(self, inputs, cls_is_bos=False, sep_is_eos=False)
hanlp/components/mtl/tasks/tok/tag_tok.py:164
Methodbuild_tokenizer
(self, tokenizer: TransformerSequenceTokenizer)
hanlp/components/mtl/tasks/tok/tag_tok.py:146
Methodbuild_tokenizer_transform
(self)
hanlp/components/parsers/biaffine/structual_attention.py:201
Methodbuild_train_dataset
(self, trn_data, batch_size)
hanlp/components/rnn_language_model_tf.py:59
Methodbuild_train_dataset
(self, trn_data, batch_size, num_examples)
hanlp/components/parsers/biaffine_parser_tf.py:230
Methodbuild_transform
(self, embeddings, **kwargs)
hanlp/components/taggers/rnn_tagger_tf.py:71
Methodbuild_transformer
(config, training=True)
hanlp/layers/transformers/encoder.py:120
Methodbuild_transformer_tokenizer
(config_or_str, use_fast=True, do_basic_tokenize=True)
hanlp/layers/transformers/encoder.py:128
Methodbuild_valid_dataset
(self, dev_data, batch_size)
hanlp/components/rnn_language_model_tf.py:63
Methodbuild_vocab
(self, trn_data, logger)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:67
Methodbuild_vocab
(self, trn_data, logger)
hanlp/components/parsers/biaffine_parser_tf.py:493
Methodbuild_vocab
(self, trn_data, logger)
hanlp/components/classifiers/transformer_classifier_tf.py:182
Methodbuild_vocabs
(self, trn, logger, **kwargs)
hanlp/components/tokenizers/multi_criteria_cws_transformer.py:48
Methodbuild_vocabs
(self, trn, logger, **kwargs)
hanlp/components/ner/transformer_ner.py:204
Methodbuild_vocabs
(self, dataset, logger=None, transformer=None)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:115
Methodbuild_vocabs
Override this method to build vocabs. Args: trn: Training set. logger: Logger for reporting progress.
hanlp/common/torch_component.py:330
Methodcache_dataset
(self, dataset, timer, training=False, logger=None)
hanlp/components/parsers/biaffine/biaffine_sdp.py:79
Functioncalc_metrics
compute overall precision, recall and FB1 (default values are 0.0) if percent is True, return 100 * original decimal value Args: tp:
hanlp/metrics/chunking/conlleval.py:230
Methodcall
(self, inputs, **kwargs)
hanlp/components/taggers/cnn_tagger_tf.py:76
Methodcall
(self, inputs, **kwargs)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:109
Methodcall
(self, inputs, training=None, mask=None)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:22
Methodcall
(self, x, y, **kwargs)
hanlp/components/parsers/biaffine_tf/layers.py:36
Methodcall
(self, x, **kwargs)
hanlp/components/parsers/biaffine_tf/layers.py:57
Methodcall
(self, x, training=None, **kwargs)
hanlp/components/parsers/biaffine_tf/layers.py:80
Methodcall
(self, inputs, training=None, **kwargs)
hanlp/components/parsers/biaffine_tf/layers.py:108
Methodcall
Call `Layer` Args: inputs: Returns:
hanlp/layers/weight_normalization.py:128
Methodcall
(self, inputs: tf.Tensor)
hanlp/layers/embeddings/fast_text_tf.py:63
Methodcall
(self, inputs: tf.Tensor, **kwargs)
hanlp/layers/embeddings/char_cnn_tf.py:32
Methodcall
(self, inputs, **kwargs)
hanlp/layers/embeddings/concat_embedding.py:38
Methodcall
(self, inputs: tf.Tensor, **kwargs)
hanlp/layers/embeddings/char_rnn_tf.py:29
Methodcall
(self, inputs)
hanlp/layers/embeddings/word2vec_tf.py:186
Methodcall
(self, inputs, **kwargs)
hanlp/layers/embeddings/contextual_string_embedding_tf.py:36
Methodcall
Build the CrfDecodeForwardRnnCell. Args: inputs: A [batch_size, num_tags] matrix of unary potentials. state: A [batch_siz
hanlp/layers/crf/crf_tf.py:393
Methodcall
(self, inputs, sequence_lengths=None, mask=None, training=None, **kwargs)
hanlp/layers/crf/crf_layer_tf.py:88
Methodcall
(self, inputs, training=None, mask=None)
hanlp/layers/crf/crf_layer_tf.py:159
Functionchars_for_tok
(sample: dict, max_string_len=20)
hanlp/datasets/parsing/amr.py:38
Functionclassification_report
Build a text report showing the main classification metrics. Args: y_true: 2d array. Ground truth (correct) target values. y_pred: 2d
hanlp/metrics/chunking/sequence_labeling.py:322
Methodclosed
The status of the file handler. :return: True if the file handler is still opened. False otherwise. Args: Returns:
hanlp/utils/file_read_backwards/file_read_backwards.py:132
Methodcollate_fn
(self, samples)
hanlp/common/dataset.py:350
Methodcollate_fn
(self, samples)
hanlp/common/dataset.py:510
Functioncollect_decay_params
(model, weight_decay)
hanlp/layers/transformers/utils.py:357
Methodcollect_outputs_extend
(self, predictions, arc_preds, rel_preds, lens, mask)
hanlp/components/parsers/biaffine/biaffine_sdp.py:134
Methodcollect_outputs_extend
(self, predictions: list, arc_preds, rel_preds, lens, mask)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:197
Functioncombine_initial_dims_to_1d_or_2d
Given a (possibly higher order) tensor of ids with shape (d1, ..., dn, sequence_length) Args: tensor: torch.Tensor: Returns:
hanlp/components/parsers/ud/udify_util.py:301
Methodcompile_model
(self, optimizer, loss, metrics)
hanlp/components/parsers/biaffine_parser_tf.py:347
Functioncompute_bleu
(gold_sentences, pred_sentences)
hanlp/components/amr/seq2seq/evaluation.py:22
Methodcompute_loss
(self, arc_scores, rel_scores, arcs, rels, mask, criterion, batch=None)
hanlp/components/parsers/biaffine/structual_attention.py:187
Methodcompute_loss
(self, arc_scores, rel_scores, arcs, rels, mask: torch.BoolTensor, criterion, batch=None)
hanlp/components/parsers/biaffine/biaffine_sdp.py:64
Methodcompute_loss
(self, arc_scores, rel_scores, arcs, rels, mask, criterion, batch=None)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:125
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/sdp.py:99
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/dep_2nd.py:83
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/pos.py:134
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/constituency.py:112
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/__init__.py:109
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/dep.py:98
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/amr.py:94
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/ud.py:92
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/lem.py:97
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/ner/biaffine_ner.py:69
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str,
hanlp/components/mtl/tasks/ner/tag_ner.py:135
Methodcompute_loss
(self, batch: Dict[str, Any], output: Union[torch.Tensor, Dict[str, torch.Tensor], Iterab
hanlp/components/mtl/tasks/srl/bio_srl.py:79
← previousnext →1,901–2,000 of 2,968, ranked by callers