MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Functiontarjan
Adopted from Timothy Dozat https://github.com/tdozat/Parser/blob/master/lib/models/nn.py Args: parse_probs(NDArray): seq_len x seq_len, the
hanlp/components/parsers/parse_alg.py:123
Functiontarjan
Adopted from Timothy Dozat https://github.com/tdozat/Parser/blob/master/lib/models/nn.py Args: parse_probs(NDArray): seq_len x seq_len, the
hanlp/components/parsers/biaffine_tf/alg.py:174
Functiontensor_is_eager
(tensor: tf.Tensor)
hanlp/utils/tf_util.py:156
Methodtest_abstract_meaning_representation
(self)
plugins/hanlp_restful/tests/test_client.py:52
Methodtest_copy
(self)
tests/test_pipeline.py:6
Methodtest_coreference_resolution
(self)
plugins/hanlp_restful/tests/test_client.py:44
Methodtest_emoji
(self)
tests/test_mtl.py:66
Methodtest_empty_dict
(self)
plugins/hanlp_trie/tests/test_trie_dict.py:29
Methodtest_enumerate_tokenization
(self)
tests/test_string_util.py:10
Methodtest_eos
(self)
tests/test_rules.py:10
Methodtest_extractive_summarization
(self)
plugins/hanlp_restful/tests/test_client.py:64
Methodtest_init
(self)
tests/test_config_tracker.py:12
Methodtest_items
(self)
plugins/hanlp_trie/tests/test_trie.py:34
Methodtest_keyphrase_extraction
(self)
plugins/hanlp_restful/tests/test_client.py:59
Methodtest_len
(self)
plugins/hanlp_trie/tests/test_trie.py:39
Methodtest_mtl_empty_str
(self)
tests/test_mtl.py:25
Methodtest_mtl_multiple_sents
(self)
tests/test_mtl.py:18
Methodtest_mtl_single_sent
(self)
tests/test_mtl.py:14
Methodtest_parse
(self)
plugins/hanlp_trie/tests/test_trie.py:14
Methodtest_parse_longest
(self)
plugins/hanlp_trie/tests/test_trie.py:26
Methodtest_raw_text
(self)
plugins/hanlp_restful/tests/test_client.py:11
Methodtest_sdp_as_the_first_task
(self)
tests/test_mtl.py:42
Methodtest_sents
(self)
plugins/hanlp_restful/tests/test_client.py:15
Methodtest_sents_mul
(self)
plugins/hanlp_restful/tests/test_client.py:27
Methodtest_skip_tok
(self)
tests/test_mtl.py:34
Methodtest_space
(self)
tests/test_mtl.py:76
Methodtest_split_batch
(self)
plugins/hanlp_trie/tests/test_trie_dict.py:16
Methodtest_text_style_transfer
(self)
plugins/hanlp_restful/tests/test_client.py:47
Methodtest_threading
(self)
tests/test_mtl.py:60
Methodtest_tok_offset
(self)
tests/test_mtl.py:90
Methodtest_tokenize
(self)
plugins/hanlp_trie/tests/test_trie_dict.py:13
Methodtest_tokenize
(self)
plugins/hanlp_restful/tests/test_client.py:33
Methodtest_tokenize_2
(self)
plugins/hanlp_trie/tests/test_trie_dict.py:24
Methodtest_tokens
(self)
plugins/hanlp_restful/tests/test_client.py:20
Methodtest_transform
(self)
tests/test_mtl.py:84
Methodtest_unicode_removed_by_hf
(self)
tests/test_mtl.py:73
MethodtextStyleTransfer
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:69
MethodtextStyleTransfer
Text style transfer aims to change the style of the input text to the target style while preserving its content. @param text Source text. @par
plugins/hanlp_restful_java/src/main/java/com/hankcs/hanlp/restful/HanLPClient.java:201
Methodto_dict
(self)
hanlp/metrics/parsing/labeled_f1.py:102
Methodto_dict
(self)
hanlp/metrics/parsing/labeled_score.py:58
Methodto_dict
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:102
Methodto_dict
(self)
hanlp/common/vocab_tf.py:194
Methodto_dict
(self)
hanlp/common/vocab.py:380
Methodto_dict
(self)
hanlp/common/vocab.py:423
Methodto_dict
(self)
hanlp/common/vocab.py:468
Methodto_dict
(self)
plugins/hanlp_common/hanlp_common/structure.py:100
Methodto_html
(pretty_text: str)
plugins/hanlp_common/hanlp_common/document.py:378
Methodto_json
(self, ensure_ascii=False, indent=2, sort=False)
plugins/hanlp_common/hanlp_common/structure.py:72
Functionto_triples
(concept: List, edge: List)
hanlp/datasets/parsing/amr.py:358
Functiontokenize
(mtl, text)
tests/test_mtl.py:9
Methodtokenize
(sample: dict, tokenizer, max_src_length=400, max_tgt_length=1024, unified_input=True, amr="src",
hanlp/components/amr/amrbart/data_interface/dataset.py:27
Methodtokenize
()
plugins/hanlp_restful_java/src/test/java/com/hankcs/hanlp/restful/HanLPClientTest.java:60
Methodtokenize
Split a document into sentences and tokenize them. @param text A document. @param coarse Whether to perform coarse-grained or fine-grained tokeniza
plugins/hanlp_restful_java/src/main/java/com/hankcs/hanlp/restful/HanLPClient.java:165
Methodtokenize_amr
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:282
Methodtokenize_amr
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:275
Methodtokenize_str
(input_str, add_special_tokens=True)
hanlp/transform/transformer_tokenizer.py:254
Methodtokenizer
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:33
Methodtokenizer
(self)
hanlp/layers/embeddings/word2vec.py:287
Methodtokenizer_transform
(self)
hanlp/components/tokenizers/transformer.py:164
Methodtokenizer_transform
(self)
hanlp/components/taggers/transformers/transformer_tagger.py:212
Methodtokens
(self)
hanlp/common/vocab_tf.py:163
Methodtokens
A set of all tokens in this vocab.
hanlp/common/vocab.py:215
Functiontolist
(t: tf.Tensor)
hanlp/components/parsers/biaffine_tf/alg.py:27
Methodtotal_time
(self)
hanlp/utils/time_util.py:123
Methodtotal_time_human
(self)
hanlp/utils/time_util.py:133
Methodtrain_batch
(self, words, feats, arcs, rels, mask, optimizer, arc_loss, rel_loss)
hanlp/components/parsers/biaffine_parser_tf.py:510
Methodtrain_loop
(self, trn_data, dev_data, epochs, num_examples, train_steps_per_epoch, dev_steps, model, optimizer,
hanlp/components/taggers/transformers/transformer_tagger_tf.py:73
Methodtrain_loop
(self, trn_data, dev_data, epochs, num_examples, train_steps_per_epoch, dev_steps, model, o
hanlp/components/parsers/biaffine_parser_tf.py:94
Methodtransform
(self, **kwargs)
hanlp/layers/embeddings/contextual_string_embedding.py:181
Methodtransform
(self, vocabs: VocabDict = None, **kwargs)
hanlp/layers/embeddings/word2vec.py:162
Methodtransform
(self, **kwargs)
hanlp/layers/embeddings/word2vec.py:345
Methodtransform
(self, **kwargs)
hanlp/layers/embeddings/contextual_word_embedding.py:156
Methodtransform
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_cnn.py:123
Methodtransform
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_rnn.py:92
Methodtransform
(self, **kwargs)
hanlp/layers/embeddings/embedding.py:112
Methodtransform_batch
(self, batch: Dict[str, Any], results: Dict[str, Any] = None, cls_is_bos=False, sep_is
hanlp/components/lemmatizer.py:52
Methodtransform_batch
(self, batch: Dict[str, Any], results: Dict[str, Any] = None, cls_is_bos=False, sep_is
hanlp/components/mtl/tasks/amr.py:163
Methodtransform_batch
This method is overrode to honor the zero indexed token used in custom dict. Although for a tokenizer, cls_is_bos = sep_is_eos = True
hanlp/components/mtl/tasks/tok/tag_tok.py:186
Methodtranslate
Translate tags for each annotation. This is an inplace operation. .. Attention:: Note that the translated document might not print w
plugins/hanlp_common/hanlp_common/document.py:436
Methodtrim_very_long_tgt_tokens
(tgt_tokens, head_tags, head_indices, node_to_idx)
plugins/hanlp_common/hanlp_common/amr.py:581
Functiontruncated_normal_
(tensor, mean=0, std=1)
hanlp/utils/torch_util.py:130
Functiontype_to_str
convert a type object to class path in str format Args: type_object: type Returns: class path
plugins/hanlp_common/hanlp_common/reflection.py:48
Methoduas
(self)
hanlp/metrics/parsing/labeled_f1.py:51
Methoduas
(self)
hanlp/metrics/parsing/attachmentscore.py:65
Methoduas
(self)
hanlp/metrics/parsing/labeled_score.py:46
Methoduas
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:51
Methoducm
(self)
hanlp/metrics/parsing/span.py:74
Methoduf
(self)
hanlp/metrics/parsing/labeled_f1.py:83
Methoduf
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:83
Methoduf
(self)
hanlp/metrics/parsing/span.py:90
Functionun_kahn
(concept, edge)
hanlp/datasets/parsing/amr.py:370
Functionuncombine_initial_dims
Given a tensor of embeddings with shape (d1 * ... * dn, sequence_length, embedding_dim) and the original shape (d1, ..., dn, sequence_leng
hanlp/components/parsers/ud/udify_util.py:318
Methodunite
(self, x, y)
hanlp/components/parsers/parse_alg.py:107
Methodunk_idx
(self)
hanlp/common/vocab_tf.py:149
Methodunk_idx
The index of ``UNK`` token.
hanlp/common/vocab.py:195
Functionunlinearize
(concept: List, edge: List, prefix=REL, extra_arc=False)
hanlp/datasets/parsing/amr.py:289
Methodunlock
Unlock each vocab.
hanlp/common/transform.py:171
Methodunpack
(y: dict)
hanlp/components/srl/span_rank/span_rank.py:411
Functionunpack_deps_to_head_deprel
(sample: dict, pad_rel=None, arc_key='arc', rel_key='rel')
hanlp/datasets/parsing/semeval15.py:16
Functionunpack_ner
(sample: dict)
hanlp/datasets/ner/loaders/json_ner.py:130
← previousnext →2,801–2,900 of 2,968, ranked by callers