MCPcopy Index your code

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

↓ 3 callersMethod_classify
(self, node)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:320
↓ 3 callersMethod_classify
(self, node)
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:450
↓ 3 callersMethod_convert_clusters
(List<List<List>> clusters)
plugins/hanlp_restful_java/src/main/java/com/hankcs/hanlp/restful/HanLPClient.java:364
↓ 3 callersFunction_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:106
↓ 3 callersMethod_get_transformer
(self)
hanlp/components/ner/biaffine_ner/biaffine_ner.py:70
↓ 3 callersMethod_get_transformer
(self)
hanlp/components/srl/span_rank/span_rank.py:68
↓ 3 callersMethod_init_weights
(self, module)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:502
↓ 3 callersFunction_len
(start, end, token_to_char_offset, char_level)
hanlp/utils/string_util.py:62
↓ 3 callersMethod_resolve_task_name
(self, dependencies)
hanlp/components/mtl/multi_task_learning.py:601
↓ 3 callersFunction_start_end
(arrow)
plugins/hanlp_common/hanlp_common/visualization.py:19
↓ 3 callersFunctionapply_lemma_rule
Applies the lemma rule to the form to generate the lemma Args: form: lemma_rule: Returns:
hanlp/components/parsers/ud/lemma_edit.py:79
↓ 3 callersFunctionbacktrack
(p_i, p_c, heads, i, j, complete)
hanlp/components/parsers/alg.py:171
↓ 3 callersFunctionblock_orth_normal_initializer
(input_size, output_size)
hanlp/components/srl/span_rank/util.py:5
↓ 3 callersFunctionbmes_of
(sentence, segmented)
hanlp/utils/span_util.py:70
↓ 3 callersFunctionbuild_adamw_optimizer
(config, learning_rate, epsilon, clipnorm, train_steps, use_amp, warmup_steps, weigh
hanlp/layers/transformers/utils_tf.py:153
↓ 3 callersMethodbuild_dataloader
Build dataloader for training, dev and test sets. It's suggested to build vocabs in this method if they are not built yet. Args:
hanlp/common/torch_component.py:315
↓ 3 callersMethodbuild_metric
(self, **kwargs)
hanlp/components/parsers/biaffine/biaffine_dep.py:558
↓ 3 callersFunctioncolor_format_len
(msg: str)
hanlp/utils/log_util.py:123
↓ 3 callersMethodcompute_loss
(self, criterion, out, y, mask)
hanlp/components/taggers/tagger.py:50
↓ 3 callersMethodcompute_loss
(self, arc_scores, rel_scores, arcs, rels, mask, criterion, batch=None)
hanlp/components/parsers/biaffine/biaffine_dep.py:487
↓ 3 callersFunctionconcat_treebanks
(home, version)
hanlp/datasets/parsing/ud/__init__.py:12
↓ 3 callersMethodconvert
(y: str)
hanlp/common/transform.py:489
↓ 3 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s `cls_token_at_end` define the location of the CLS token: - False (Default, BERT/XLM
hanlp/layers/transformers/utils_tf.py:13
↓ 3 callersMethodconvert_to_3d_mask
(arc_scores, mask)
hanlp/components/parsers/biaffine/biaffine_sdp.py:58
↓ 3 callersMethodconvert_to_3d_puncts
(puncts, mask)
hanlp/components/parsers/biaffine/biaffine_sdp.py:52
↓ 3 callersMethodcoreferenceResolution
Coreference resolution is the task of clustering mentions in text that refer to the same underlying real world entities. @param text A piece of text,
plugins/hanlp_restful_java/src/main/java/com/hankcs/hanlp/restful/HanLPClient.java:316
↓ 3 callersMethoddecode
(self, arc_scores, rel_scores, mask)
hanlp/components/parsers/biaffine_parser_tf.py:253
↓ 3 callersMethoddecode
(self, arc_scores, rel_scores, mask, batch=None)
hanlp/components/parsers/biaffine/biaffine_dep.py:543
↓ 3 callersMethoddecode
(self, output: SequenceClassifierOutput)
hanlp/components/sts/transformer_sts.py:238
↓ 3 callersMethoddecode
(self, contextualized_embeddings, sent_lengths, masks, gold_arg_starts, gold_arg_ends, gold_arg_labels,
hanlp/components/srl/span_rank/span_ranking_srl_model.py:371
↓ 3 callersMethoddecode_output
(self, out, mask, batch, span_probs=None, decoder=None, tokens=None)
hanlp/components/parsers/constituency/crf_constituency_parser.py:118
↓ 3 callersMethoddecode_output
(self, outputs, mask, batch)
hanlp/components/parsers/ud/ud_parser.py:284
↓ 3 callersMethoddecode_output
(self, pred, mask, batch, decoder=None)
hanlp/components/srl/span_bio/span_bio.py:168
↓ 3 callersMethoddecode_output
(self, output_dict, batch, task_name=None)
hanlp/components/mtl/multi_task_learning.py:722
↓ 3 callersMethoddecode_spans
(pred_tags: torch.LongTensor, lens: Union[List[int], torch.LongTensor])
hanlp/metrics/chunking/binary_chunking_f1.py:23
↓ 3 callersFunctiondtype_of
(e: Union[int, bool, float])
hanlp/utils/torch_util.py:140
↓ 3 callersFunctionencode
(g, top=None, indent=-1, compact=False)
hanlp/components/amr/amrbart/common/penman_interface.py:78
↓ 3 callersFunctionevaluate_iobes
(true_seqs, pred_seqs)
hanlp/metrics/chunking/conlleval.py:151
↓ 3 callersFunctionfactorize
r""" Factorizes the tree into a sequence. The tree is traversed in pre-order. Args: tree (tree.Tree): The tree to be
hanlp/datasets/parsing/loaders/constituency_dataset.py:105
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/ner/biaffine_ner/biaffine_ner.py:356
↓ 3 callersMethodfeed_batch
(self, batch: dict)
hanlp/components/parsers/constituency/crf_constituency_parser.py:156
↓ 3 callersMethodfeed_batch
(self, batch: dict)
hanlp/components/parsers/ud/ud_parser.py:302
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/parsers/biaffine/biaffine_dep.py:472
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/classifiers/transformer_classifier.py:201
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/sts/transformer_sts.py:234
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/srl/span_rank/span_rank.py:379
↓ 3 callersMethodfeed_batch
(self, batch: dict)
hanlp/components/srl/span_bio/span_bio.py:204
↓ 3 callersMethodfeed_batch
(self, batch)
hanlp/components/eos/ngram.py:309
↓ 3 callersMethodfeed_batch
(self, batch: Dict[str, Any], task_name, output_dict=
hanlp/components/mtl/multi_task_learning.py:673
↓ 3 callersMethodfile_to_inputs
Transform file to inputs. The inputs are defined as raw features (e.g. words) to be processed into more features (e.g. forms and char
hanlp/common/transform_tf.py:75
↓ 3 callersMethodfit
(self, trn_data, dev_data, save_dir, n_embed=100, pretrained_embed=None, e
hanlp/components/parsers/biaffine_parser_tf.py:60
↓ 3 callersMethodformat_row
(self, cells)
hanlp/callbacks/fine_csv_logger.py:18
↓ 3 callersMethodget_metric
# Returns The accumulated accuracy.
hanlp/metrics/accuracy.py:201
↓ 3 callersMethodget_pad_dict
(self)
hanlp/components/parsers/biaffine/biaffine_dep.py:334
↓ 3 callersMethodget_token
Get the token using its index. Args: idx: The index to a token. Returns:
hanlp/common/vocab.py:132
↓ 3 callersFunctiongpus_available
()
hanlp/utils/torch_util.py:21
↓ 3 callersFunctionhandle_bit
(word_index, bit, stack, spans, label_set)
hanlp/datasets/srl/ontonotes5/_utils.py:233
↓ 3 callersFunctionhuman_bytes
(file_size: int)
hanlp/utils/io_util.py:390
↓ 3 callersMethodindex_sequence
(self, list_tokens)
plugins/hanlp_common/hanlp_common/amr.py:849
↓ 3 callersMethodinputs_to_samples
(self, inputs, gold=False)
hanlp/common/transform_tf.py:87
↓ 3 callersMethodload
(self, save_dir, model_path=None, **kwargs)
hanlp/components/classifiers/fasttext_classifier.py:29
↓ 3 callersFunctionload_pickle
(path)
plugins/hanlp_common/hanlp_common/io.py:16
↓ 3 callersMethodload_weights
(self, save_dir, filename='model.h5', functional=False, **kwargs)
hanlp/components/parsers/biaffine_parser_tf.py:55
↓ 3 callersMethodload_weights
(self, save_dir, filename='model.h5', **kwargs)
hanlp/common/keras_component.py:170
↓ 3 callersFunctionload_word2vec
(path, delimiter=' ', cache=True)
hanlp/utils/torch_util.py:186
↓ 3 callersFunctionmake_ontonotes_language_jsonlines
(conll12_ontonotes_path, output_path=None, language='english')
hanlp/datasets/srl/ontonotes5/_utils.py:371
↓ 3 callersFunctionmake_table
(rows, insert_header=False)
plugins/hanlp_common/hanlp_common/visualization.py:10
↓ 3 callersFunctionnice
()
hanlp/utils/tf_util.py:130
↓ 3 callersMethodon_epoch_end
(self, epoch, logs=None)
hanlp/components/parsers/biaffine_parser_tf.py:540
↓ 3 callersFunctionpad
(tensors, padding_value=0, total_length=None)
hanlp/components/parsers/alg.py:721
↓ 3 callersMethodparse_longest
Longest-prefix-matching which tries to match the longest keyword sequentially from the head of the text till its tail. By definition, the matc
plugins/hanlp_trie/hanlp_trie/trie.py:123
↓ 3 callersMethodprune
Prune (to discard) samples according to a criterion. Args: criterion: A functions takes a sample as input and output ``True`` if
hanlp/common/dataset.py:290
↓ 3 callersFunctionread_cells
(filepath: str, delimiter='auto', strip=True, skip_header=False)
hanlp/utils/io_util.py:401
↓ 3 callersFunctionremove_color_tag
(msg: str)
hanlp/utils/log_util.py:115
↓ 3 callersMethodremove_node
(self, node)
plugins/hanlp_common/hanlp_common/amr.py:426
↓ 3 callersFunctionrender_labeled_span
(b, e, spans, labels, label, offset, unidirectional=False)
plugins/hanlp_common/hanlp_common/visualization.py:180
↓ 3 callersMethodreport_metrics
(self, loss, metrics: MetricDict)
hanlp/components/mtl/multi_task_learning.py:384
↓ 3 callersMethodreset_states
(self)
hanlp/metrics/chunking/bmes_tf.py:44
↓ 3 callersMethodresize_token_embeddings
(self, new_num_tokens: int)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1292
↓ 3 callersMethodsave_config
Save config into a directory. Args: save_dir: The directory to save config. filename: A file name for config.
hanlp/common/torch_component.py:106
↓ 3 callersMethodsave_json
(self, path)
plugins/hanlp_common/hanlp_common/structure.py:84
↓ 3 callersFunctionsave_pickle
(item, path)
plugins/hanlp_common/hanlp_common/io.py:11
↓ 3 callersFunctionshift_tokens_right
Shift input ids one token to the right.
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:75
↓ 3 callersFunctionsplit_long_sentence_into
(tokens: List[str], max_seq_length, sent_delimiter=None, char_level=False, hard_c
hanlp/utils/string_util.py:17
↓ 3 callersFunctionsplit_sentence
(text, best=True)
hanlp/utils/rules.py:19
↓ 3 callersFunctionstdout_redirected
Redirect stdout to else where. Copied from https://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python/22434262#22434262
hanlp/utils/io_util.py:544
↓ 3 callersMethodtag_to_span
(self, batch_tags, batch: dict)
hanlp/components/tokenizers/transformer.py:115
↓ 3 callersMethodtext_style_transfer
Text style transfer aims to change the style of the input text to the target style while preserving its content. Args: t
plugins/hanlp_restful/hanlp_restful/__init__.py:170
↓ 3 callersMethodto_json
Convert to json string. Args: ensure_ascii: ``False`` to allow for non-ascii text. indent: Indent per nested structur
plugins/hanlp_common/hanlp_common/document.py:88
↓ 3 callersMethodtokenize_amr
(self, amr_tokens)
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:97
↓ 3 callersFunctionunique_root
(parse_probs, tokens_to_keep: np.ndarray, length)
hanlp/components/parsers/parse_alg.py:183
↓ 3 callersMethodupdate
Update the vocab with these tokens by adding them to vocab one by one. Args: tokens: Iterable[str]: Returns:
hanlp/common/vocab_tf.py:70
↓ 3 callersMethodupdate_metrics
(self, metric, logits, y, mask, batch=None, prediction=None)
hanlp/components/taggers/tagger.py:110
↓ 2 callersMethodXY_to_inputs_outputs
Convert predicted tensors to outputs Parameters ---------- X : Union[tf.Tensor, Tuple[tf.Tensor]] The in
hanlp/common/transform_tf.py:251
↓ 2 callersMethodX_to_inputs
(self, X: Union[tf.Tensor, Tuple[tf.Tensor]])
hanlp/common/transform_tf.py:244
↓ 2 callersMethod__getattr__
(self, key)
hanlp/common/transform.py:192
↓ 2 callersMethod__init__
(self, transform: RNNTokenizerTransform = None)
hanlp/components/tokenizers/tok_tf.py:100
↓ 2 callersMethod__init__
(self, config: SerializableDict = None, map_x=True, map_y=True, **kwargs)
hanlp/components/taggers/ngram_conv/ngram_conv_tagger.py:21
↓ 2 callersMethod__init__
(self, input_size, hidden_size, num_layers=1, bidirectional=False, dropout=0)
hanlp/components/parsers/biaffine/variationalbilstm.py:64
↓ 2 callersMethod__init__
(self, hidden_size, n_mlp_arc, n_mlp_rel, mlp_dropout, n_rels, arc_dropout=None, rel_dropout=
hanlp/components/parsers/biaffine/biaffine_model.py:155
← previousnext →201–300 of 2,968, ranked by callers