Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/hankcs/HanLP
/ functions
Functions
2,968 in github.com/hankcs/HanLP
⨍
Functions
2,968
◇
Types & classes
423
↳
Endpoints
2
Method
lf
(self)
hanlp/metrics/parsing/labeled_f1.py:90
Method
lf
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:90
Method
lf
(self)
hanlp/metrics/parsing/span.py:102
Function
linear_decay_weight_scheduler
(x)
hanlp/components/distillation/schedulers.py:15
Function
linear_growth_weight_scheduler
(x)
hanlp/components/distillation/schedulers.py:11
Method
linearize
(self, *args, **kwargs)
hanlp/components/amr/seq2seq/dataset/linearization.py:62
Function
list_is_list_of_lists
(sent: Union[Any, List[Any]])
plugins/hanlp_common/hanlp_common/util.py:33
Function
list_treebank
(ctb_home)
hanlp/datasets/parsing/loaders/_ctb_utils.py:126
Function
load
Load a pretrained component from an identifier. Args: save_dir (str): The identifier to the saved component. It could be a remote URL or a
hanlp/__init__.py:13
Function
load
(source, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/common/penman_interface.py:60
Function
load
(source, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/preprocess/penman_interface.py:60
Method
load
()
hanlp/utils/lang/zh/char_table.py:50
Function
load_bracketed_trees
(chtbs)
hanlp/datasets/parsing/loaders/_ctb_utils.py:132
Method
load_config
(self, save_dir: str, filename='config.json', **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:124
Method
load_config
(self, save_dir: str, filename='config.json', **kwargs)
hanlp/components/amr/amrbart/bart_amr_parser.py:152
Method
load_config
(self, save_dir, filename='config.json', **kwargs)
hanlp/components/lm/mlm.py:105
Method
load_config
(self, save_dir, filename='config.json', **kwargs)
hanlp/layers/embeddings/word2vec.py:296
Function
load_domains
Load file ids from a Chinese treebank grouped by domains. Args: ctb_home: Root path to CTB. Returns: A dict of sets, ea
hanlp/datasets/parsing/loaders/_ctb_utils.py:273
Method
load_file
(self, filepath: str)
hanlp/components/amr/seq2seq/dataset/dataset.py:32
Method
load_file
(self, filepath: str)
hanlp/components/amr/seq2seq/dataset/dataset.py:62
Method
load_file
(self, filepath: str)
hanlp/components/lm/mlm.py:24
Method
load_file
(self, filepath: str)
hanlp/layers/embeddings/fast_text.py:112
Method
load_file
(self, filepath: str)
hanlp/layers/embeddings/word2vec.py:171
Method
load_file
(self, filepath: str)
hanlp/common/dataset.py:831
Method
load_file
(self, filepath)
hanlp/datasets/tokenization/loaders/chunking_dataset.py:25
Method
load_file
Load tokenized corpus. The format is one sentence per line, where each line consisits of tokens seperated by a delimiter (usually space).
hanlp/datasets/tokenization/loaders/txt.py:47
Method
load_file
Load multi-criteria corpora specified in filepath. Args: filepath: A list of files where filename is its criterion. Or a dict of
hanlp/datasets/tokenization/loaders/multi_criteria_cws/mcws_dataset.py:28
Method
load_file
Load ``.jsonlines`` NER corpus. Samples of this corpus can be found using the following scripts. .. highlight:: python .. code-block:
hanlp/datasets/ner/loaders/json_ner.py:34
Method
load_file
Load a ``.tsv`` file. A ``.tsv`` file for tagging is defined as a tab separated text file, where non-empty lines have two columns for token an
hanlp/datasets/ner/loaders/tsv.py:47
Method
load_file
(self, filepath)
hanlp/datasets/qa/hotpotqa.py:20
Method
load_file
(self, filepath: str)
hanlp/datasets/sts/stsb.py:30
Method
load_file
(self, filepath: str)
hanlp/datasets/parsing/amr.py:24
Method
load_file
Both ``.conllx`` and ``.conllu`` are supported. Their descriptions can be found in :class:`hanlp_common.conll.CoNLLWord` and :class:`hanlp_com
hanlp/datasets/parsing/loaders/conll_dataset.py:33
Method
load_file
(self, filepath: str)
hanlp/datasets/parsing/loaders/constituency_dataset.py:13
Method
load_file
(self, filepath: str)
hanlp/datasets/srl/loaders/conll2012.py:18
Method
load_file
Load ``.jsonlines`` CoNLL12-style corpus. Samples of this corpus can be found using the following scripts. .. highlight:: python .. c
hanlp/datasets/srl/loaders/conll2012.py:91
Method
load_file
Load eos corpus. Args: filepath: Path to the corpus. .. highlight:: bash .. code-block:: bash $ hea
hanlp/datasets/eos/eos.py:48
Method
load_file
(self, filepath: str)
hanlp/datasets/coref/loaders/conll12coref.py:60
Function
load_jsonl
(path, verbose=False)
hanlp/utils/io_util.py:39
Method
load_transform
(self, save_dir)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:90
Method
load_vocab
(self, save_dir, filename=None)
hanlp/common/transform.py:61
Method
load_vocab
(self, save_dir)
hanlp/common/transform.py:94
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/amr/amrbart/bart_amr_generation.py:132
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/amr/amrbart/bart_amr_parser.py:160
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/classifiers/transformer_regression_hf.py:57
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/classifiers/transformer_classifier_hf.py:57
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/lm/mlm.py:108
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/mtl/multi_task_learning.py:765
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/layers/embeddings/fast_text.py:150
Method
load_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/layers/embeddings/word2vec.py:210
Method
load_vocabs
Load vocabularies from a directory. Args: save_dir: The directory to load vocabularies. filename: The name for vocab
hanlp/common/transform.py:127
Method
load_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:138
Method
load_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/classifiers/transformer_regression_hf.py:60
Method
load_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/classifiers/transformer_classifier_hf.py:60
Method
load_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/layers/embeddings/fast_text.py:153
Method
load_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/layers/embeddings/word2vec.py:213
Function
loads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/seq2seq/dataset/penman.py:63
Function
loads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/common/penman_interface.py:69
Function
loads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/preprocess/penman_interface.py:69
Method
lock
Lock each vocab.
hanlp/common/transform.py:163
Method
lock_vocabs
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:64
Method
lock_vocabs
(self)
hanlp/transform/conll_tf.py:318
Method
lock_vocabs
(self)
hanlp/transform/conll_tf.py:617
Method
locked
(self)
hanlp/common/vocab_tf.py:145
Method
locked
``True`` indicates this vocab is locked.
hanlp/common/vocab.py:188
Method
loss
r""" Args: s_span (~torch.Tensor): ``[batch_size, seq_len, seq_len]``. Scores of all spans s_label (~t
hanlp/components/parsers/constituency/crf_constituency_model.py:147
Method
lower
(self)
hanlp/common/vocab_tf.py:210
Method
lp
(self)
hanlp/metrics/parsing/labeled_f1.py:77
Method
lp
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:77
Method
lp
(self)
hanlp/metrics/parsing/span.py:94
Method
lr
(self)
hanlp/metrics/parsing/labeled_f1.py:71
Method
lr
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:71
Method
lr
(self)
hanlp/metrics/parsing/span.py:98
Function
ls_resource_in_module
(root)
hanlp/utils/__init__.py:7
Function
main
()
hanlp/transform/glue_tf.py:20
Function
make_debug_corpus
(path, delimiter=None, percentage=0.1, max_samples=100)
hanlp/utils/io_util.py:50
Function
make_raw_text_if_necessary
(home: str)
hanlp/datasets/srl/ontonotes5/_utils.py:642
Method
mapper
(X, Y)
hanlp/common/transform_tf.py:197
Method
mask_p
(self)
hanlp/transform/conll_tf.py:355
Function
match_decorator
(fn)
hanlp/utils/lang/en/english_tokenizer.py:167
Method
max_seq_len
(self)
hanlp/datasets/lm/loaders/lm_dataset.py:119
Method
max_seq_length
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:28
Method
max_seq_length
(self)
hanlp/transform/tsv_tf.py:74
Function
mean_model
(model: torch.nn.Module)
hanlp/utils/torch_util.py:150
Method
merge
(self, other)
hanlp/common/vocab_tf.py:226
Method
merge
Merge this with another vocab inplace. Args: other (Vocab): Another vocab.
hanlp/common/vocab.py:314
Function
merge_head_deprel_with_2nd
(sample: dict)
hanlp/datasets/parsing/semeval15.py:48
Function
merge_parts
(parts, offsets, words)
plugins/hanlp_demo/hanlp_demo/zh/tf/demo_cws_trie.py:35
Function
merge_pos_into_con
(doc: Document)
plugins/hanlp_demo/hanlp_demo/zh/demo_parse_constituency.py:14
Method
meta
(self)
hanlp/components/pipeline.py:157
Function
mmd_loss
r''' * Takes in two lists of matrices `state_S` and `state_T`. Each list contains 2 matrices of the shape (*batch_size*, *length*, *hidden_size*).
hanlp/components/distillation/losses.py:237
Method
model_
The actual model when it's wrapped by a `DataParallel` Returns: The "real" model
hanlp/common/torch_component.py:604
Method
module
(self, **kwargs)
hanlp/layers/embeddings/contextual_string_embedding.py:188
Method
module
(self, **kwargs)
hanlp/layers/embeddings/word2vec.py:348
Method
module
(self, training=True, **kwargs)
hanlp/layers/embeddings/contextual_word_embedding.py:159
Method
module
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_cnn.py:137
Method
module
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_rnn.py:105
Method
module
(self, **kwargs)
hanlp/layers/embeddings/embedding.py:117
Function
mst
r""" MST algorithm for decoding non-pojective trees. This is a wrapper for ChuLiu/Edmonds algorithm. The algorithm first runs ChuLiu/Edmo
hanlp/components/parsers/alg.py:507
Function
mst_then_greedy
(arc_scores, rel_scores, mask, root_rel_idx, rel_idx=None)
hanlp/components/parsers/parse_alg.py:234
← previous
next →
2,501–2,600 of 2,968, ranked by callers