MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

↓ 1 callersMethodextract_spans
extract the topk span indices Args: candidate_scores: param candidate_starts: candidate_ends: param topk: [num_sentences]
hanlp/components/srl/span_rank/span_ranking_srl_model.py:215
↓ 1 callersMethodextractive_summarization
Single document summarization is the task of selecting a subset of the sentences which best represents a summary of the document, with a bala
plugins/hanlp_restful/hanlp_restful/__init__.py:402
↓ 1 callersFunctionf1_score
Compute the F1 score. The F1 score can be interpreted as a weighted average of the precision and recall, where an F1 score reaches its be
hanlp/metrics/chunking/sequence_labeling.py:145
↓ 1 callersMethodfeed_batch
(self, batch)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:209
↓ 1 callersMethodfeed_batch
(self, batch)
hanlp/components/taggers/rnn_tagger.py:108
↓ 1 callersFunctionfile_exist
(filename)
hanlp/utils/io_util.py:131
↓ 1 callersMethodfile_to_inputs
(self, filepath: str, gold=True)
hanlp/transform/tsv_tf.py:68
↓ 1 callersMethodfile_to_inputs
(self, filepath: str, gold=True)
hanlp/transform/text_tf.py:48
↓ 1 callersFunctionfilter_state_dict_safely
(model_state: dict, load_state: dict)
hanlp/utils/torch_util.py:289
↓ 1 callersMethodfinalize
(self)
hanlp/datasets/srl/ontonotes5/_utils.py:112
↓ 1 callersMethodfinalize_dataset
(self, dataset, logger: logging.Logger = None)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:81
↓ 1 callersMethodfinalize_document
(self, doc: Document, task_name: str)
hanlp/components/mtl/tasks/__init__.py:287
↓ 1 callersMethodfinalize_sentence
(self)
hanlp/datasets/srl/ontonotes5/_utils.py:89
↓ 1 callersFunctionfind_similar_token
(token, tokens)
plugins/hanlp_common/hanlp_common/amr.py:63
↓ 1 callersFunctionfind_transformer
(embed: nn.Module)
hanlp/layers/embeddings/contextual_word_embedding.py:180
↓ 1 callersMethodfit
(self, trn_data: str, dev_data: str = None, save_dir: str = None, embeddings=100, embedding_trainable=False,
hanlp/components/tokenizers/tok_tf.py:105
↓ 1 callersMethodfit
(self, trn_data, dev_data, save_dir, batch_size=50, epochs=100, embed=100, rnn_input=None, rnn_hidden=256,
hanlp/components/tokenizers/tok.py:48
↓ 1 callersMethodfit
(self, trn_path: str, **kwargs)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:59
↓ 1 callersMethodfit
(self, trn_data, dev_data, save_dir, transformer, optimizer='adamw', learn
hanlp/components/taggers/transformers/transformer_tagger_tf.py:38
↓ 1 callersMethodfit
(self, trn_data, dev_data, save_dir, transformer=None, lr=5e-5, transforme
hanlp/components/classifiers/transformer_classifier.py:86
↓ 1 callersMethodfit
(self, encoder: Embedding, tasks: Dict[str, Task], save_dir, e
hanlp/components/mtl/multi_task_learning.py:617
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, history:
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:177
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/ner/biaffine_ner/biaffine_ner.py:115
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/parsers/constituency/crf_constituency_parser.py:81
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/parsers/ud/ud_parser.py:248
↓ 1 callersMethodfit_dataloader
(self, trn, optimizer, scheduler,
hanlp/components/parsers/biaffine/biaffine_dep.py:427
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, **kwargs)
hanlp/components/classifiers/transformer_classifier.py:169
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric: SpearmanCorrelation, logger: logging.Logger,
hanlp/components/sts/transformer_sts.py:101
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/srl/span_rank/span_rank.py:112
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/srl/span_bio/span_bio.py:123
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/eos/ngram.py:124
↓ 1 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimi
hanlp/components/mtl/multi_task_learning.py:323
↓ 1 callersFunctionflatten
(l)
hanlp/datasets/srl/ontonotes5/_utils.py:24
↓ 1 callersMethodflatten_emb_in_sentence
(self, emb, batch_sentences_mask)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:141
↓ 1 callersFunctionflsw_temperature_scheduler_builder
adapted from arXiv:1911.07471
hanlp/components/distillation/schedulers.py:26
↓ 1 callersFunctionformat_fast_scores
(text: str)
hanlp/metrics/amr/smatch_eval.py:88
↓ 1 callersFunctionformat_official_scores
(text: str)
hanlp/metrics/amr/smatch_eval.py:60
↓ 1 callersFunctionformat_scores
(results: Dict[str, float])
hanlp/utils/string_util.py:8
↓ 1 callersMethodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1181
↓ 1 callersMethodforward
(self, x: torch.Tensor, batch=None, **kwargs)
hanlp/components/taggers/rnn/rnntaggingmodel.py:78
↓ 1 callersMethodforward
r""" Args: scores (~torch.Tensor, ~torch.Tensor): Tuple of two tensors `s_arc` and `s_sib`. `s_arc
hanlp/components/parsers/constituency/treecrf.py:122
↓ 1 callersMethodforward
r""" Args: sequence (~torch.nn.utils.rnn.PackedSequence): A packed variable length sequence. hx (~torc
hanlp/components/parsers/biaffine/variationalbilstm.py:141
↓ 1 callersMethodforward
(self, x, mask=None, **kwargs: Any)
hanlp/components/parsers/biaffine/biaffine_model.py:181
↓ 1 callersMethodforward
(self, logits_S, logits_T)
hanlp/components/distillation/schedulers.py:84
↓ 1 callersMethodforward
(self, input, masks, initial=None)
hanlp/components/srl/span_rank/highway_variational_lstm.py:78
↓ 1 callersMethodforward
(self, x: torch.Tensor, **kwargs)
hanlp/components/srl/span_bio/baffine_tagging.py:38
↓ 1 callersMethodforward
(self, f_chars_id: torch.Tensor, f_offset: torch.LongTensor, b
hanlp/layers/embeddings/contextual_string_embedding.py:102
↓ 1 callersMethodfrom_config
(config: dict, **kwargs)
hanlp/common/transform.py:343
↓ 1 callersMethodfrom_dict
Build a CoNLLSentence from a dict. Args: d: A dict storing a list for each field, where each index corresponds to a token.
plugins/hanlp_common/hanlp_common/conll.py:254
↓ 1 callersMethodfrom_file
Build a CoNLLSentence from ``.conllx`` or ``.conllu`` file Args: path: Path to the file. conllu: ``True`` to build :clas
plugins/hanlp_common/hanlp_common/conll.py:238
↓ 1 callersMethodfrom_name
(name)
hanlp/components/distillation/schedulers.py:88
↓ 1 callersMethodfrom_str
Build a CoNLLSentence from CoNLL-X format str Args: conll (str): CoNLL-X or CoNLL-U format string conllu: ``True`` to bu
plugins/hanlp_common/hanlp_common/conll.py:197
↓ 1 callersMethodgather_4d
(params, indices)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:288
↓ 1 callersFunctiongenerate_ngram_bmes
(file_path, bigram_only=False, window_size=4, gold=True)
hanlp/transform/txt_tf.py:102
↓ 1 callersMethodgenerate_prediction_filename
(self, tst_data, save_dir)
hanlp/common/torch_component.py:505
↓ 1 callersMethodgenerate_text
(self, text: Union[str, List[str]] = '\n', num_steps=50)
hanlp/components/rnn_language_model_tf.py:67
↓ 1 callersMethodget_arg_unary_scores
Compute span score with FFNN(span embedding) Args: span_emb: tensor of [num_sentences, num_spans, emb_size] config: param
hanlp/components/srl/span_rank/span_ranking_srl_model.py:188
↓ 1 callersMethodget_candidate_spans
(sent_lengths: torch.Tensor, max_sent_length, max_arg_width)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:97
↓ 1 callersFunctionget_concepts
(sample: dict, vocab: VocabWithFrequency = None, rel_vocab: VocabWithFrequency = None)
hanlp/datasets/parsing/amr.py:55
↓ 1 callersMethodget_config
(self)
hanlp/layers/crf/crf_layer_tf.py:55
↓ 1 callersMethodget_config
(self)
hanlp/optimizers/adamw/optimization.py:58
↓ 1 callersMethodget_copy_map
(self, list_tokens)
plugins/hanlp_common/hanlp_common/amr.py:852
↓ 1 callersMethodget_decoder
(self)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1170
↓ 1 callersMethodget_dense_span_labels
(self, span_starts, span_ends, span_labels, max_sentence_length)
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:92
↓ 1 callersMethodget_dense_span_labels
(self, span_starts, span_ends, span_labels, max_sentence_length, span_parents=No
hanlp/components/srl/span_rank/span_ranking_srl_model.py:265
↓ 1 callersMethodget_device
(self)
hanlp/layers/embeddings/contextual_word_embedding.py:73
↓ 1 callersMethodget_encoder
(self)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1167
↓ 1 callersMethodget_frames
(self)
hanlp/components/amr/seq2seq/dataset/dataset.py:48
↓ 1 callersMethodget_output_dim
(self)
hanlp/layers/embeddings/embedding.py:22
↓ 1 callersMethodget_pred_unary_scores
(self, span_emb)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:207
↓ 1 callersMethodget_roles
(self)
hanlp/components/amr/seq2seq/dataset/dataset.py:38
↓ 1 callersMethodget_span_emb
(self, flatted_context_emb, flatted_candidate_starts, flatted_candidate_ends, config, dro
hanlp/components/srl/span_rank/span_ranking_srl_model.py:146
↓ 1 callersMethodget_src_tokens
(self)
plugins/hanlp_common/hanlp_common/amr.py:499
↓ 1 callersMethodget_srl_labels
(self, arg_starts, arg_ends, predicates,
hanlp/components/srl/span_rank/span_ranking_srl_model.py:294
↓ 1 callersMethodget_srl_scores
(self, arg_emb, pred_emb, arg_scores, pred_scores, num_labels, config, dropout)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:330
↓ 1 callersMethodget_srl_softmax_loss
(self, srl_scores, srl_labels, num_predicted_args, num_predicted_preds)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:355
↓ 1 callersMethodget_srl_unary_scores
(self, span_emb)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:322
↓ 1 callersFunctionget_ud_treebank_files
Retrieves all treebank data paths in the given directory. Adopted from https://github.com/Hyperparticle/udify MIT Licence Args: dat
hanlp/components/parsers/ud/udify_util.py:31
↓ 1 callersFunctionhandle_line
(line, document_state: DocumentState, language, labels, stats)
hanlp/datasets/srl/ontonotes5/_utils.py:269
↓ 1 callersFunctionhanlp_home_default
Default data directory depending on the platform and environment variables
hanlp/utils/io_util.py:100
↓ 1 callersMethodhas_returned_every_line
hanlp/utils/file_read_backwards/buffer_work_space.py:91
↓ 1 callersFunctionid_of_chtb
(each: str)
hanlp/datasets/parsing/loaders/_ctb_utils.py:244
↓ 1 callersMethodid_to_tags
(self, ids: torch.LongTensor, lens: List[int])
hanlp/components/taggers/tagger.py:101
↓ 1 callersMethodindex_by_type
(self, t)
hanlp/common/transform.py:330
↓ 1 callersMethodindices
(self)
hanlp/components/parsers/alg_tf.py:166
↓ 1 callersMethodinit_amr_vocabulary
(self, additions: Set[str] = None, recategorization_tokens: Iterable[str] = None)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:43
↓ 1 callersMethodinit_amr_vocabulary
(self, additions: Set[str] = None, recategorization_tokens: Iterable[str] = None)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:44
↓ 1 callersMethodinit_amr_vocabulary
(self)
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:49
↓ 1 callersFunctioninitializer_1d
(input_tensor, initializer)
hanlp/components/srl/span_rank/highway_variational_lstm.py:11
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:377
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/amr/amrbart/bart_amr_generation.py:76
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/amr/amrbart/bart_amr_parser.py:77
↓ 1 callersMethodinput_is_flat
(self, tokens)
hanlp/components/taggers/tagger.py:156
↓ 1 callersMethodinput_is_flat
(data)
hanlp/components/ner/biaffine_ner/biaffine_ner.py:267
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/parsers/constituency/crf_constituency_parser.py:258
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/parsers/ud/ud_parser.py:321
↓ 1 callersMethodinput_is_flat
(self, data, use_pos=None)
hanlp/components/parsers/biaffine/biaffine_dep.py:84
↓ 1 callersMethodinput_is_flat
(self, masked_sents)
hanlp/components/lm/mlm.py:71
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/srl/span_rank/span_rank.py:313
↓ 1 callersMethodinput_is_flat
(self, data)
hanlp/components/srl/span_bio/span_bio.py:371
← previousnext →901–1,000 of 2,968, ranked by callers