MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

Methodlf
(self)
hanlp/metrics/parsing/labeled_f1.py:90
Methodlf
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:90
Methodlf
(self)
hanlp/metrics/parsing/span.py:102
Functionlinear_decay_weight_scheduler
(x)
hanlp/components/distillation/schedulers.py:15
Functionlinear_growth_weight_scheduler
(x)
hanlp/components/distillation/schedulers.py:11
Methodlinearize
(self, *args, **kwargs)
hanlp/components/amr/seq2seq/dataset/linearization.py:62
Functionlist_is_list_of_lists
(sent: Union[Any, List[Any]])
plugins/hanlp_common/hanlp_common/util.py:33
Functionlist_treebank
(ctb_home)
hanlp/datasets/parsing/loaders/_ctb_utils.py:126
Functionload
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
Functionload
(source, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/common/penman_interface.py:60
Functionload
(source, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/preprocess/penman_interface.py:60
Methodload
()
hanlp/utils/lang/zh/char_table.py:50
Functionload_bracketed_trees
(chtbs)
hanlp/datasets/parsing/loaders/_ctb_utils.py:132
Methodload_config
(self, save_dir: str, filename='config.json', **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:124
Methodload_config
(self, save_dir: str, filename='config.json', **kwargs)
hanlp/components/amr/amrbart/bart_amr_parser.py:152
Methodload_config
(self, save_dir, filename='config.json', **kwargs)
hanlp/components/lm/mlm.py:105
Methodload_config
(self, save_dir, filename='config.json', **kwargs)
hanlp/layers/embeddings/word2vec.py:296
Functionload_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
Methodload_file
(self, filepath: str)
hanlp/components/amr/seq2seq/dataset/dataset.py:32
Methodload_file
(self, filepath: str)
hanlp/components/amr/seq2seq/dataset/dataset.py:62
Methodload_file
(self, filepath: str)
hanlp/components/lm/mlm.py:24
Methodload_file
(self, filepath: str)
hanlp/layers/embeddings/fast_text.py:112
Methodload_file
(self, filepath: str)
hanlp/layers/embeddings/word2vec.py:171
Methodload_file
(self, filepath: str)
hanlp/common/dataset.py:831
Methodload_file
(self, filepath)
hanlp/datasets/tokenization/loaders/chunking_dataset.py:25
Methodload_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
Methodload_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
Methodload_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
Methodload_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
Methodload_file
(self, filepath)
hanlp/datasets/qa/hotpotqa.py:20
Methodload_file
(self, filepath: str)
hanlp/datasets/sts/stsb.py:30
Methodload_file
(self, filepath: str)
hanlp/datasets/parsing/amr.py:24
Methodload_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
Methodload_file
(self, filepath: str)
hanlp/datasets/parsing/loaders/constituency_dataset.py:13
Methodload_file
(self, filepath: str)
hanlp/datasets/srl/loaders/conll2012.py:18
Methodload_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
Methodload_file
Load eos corpus. Args: filepath: Path to the corpus. .. highlight:: bash .. code-block:: bash $ hea
hanlp/datasets/eos/eos.py:48
Methodload_file
(self, filepath: str)
hanlp/datasets/coref/loaders/conll12coref.py:60
Functionload_jsonl
(path, verbose=False)
hanlp/utils/io_util.py:39
Methodload_transform
(self, save_dir)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:90
Methodload_vocab
(self, save_dir, filename=None)
hanlp/common/transform.py:61
Methodload_vocab
(self, save_dir)
hanlp/common/transform.py:94
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/amr/amrbart/bart_amr_generation.py:132
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/amr/amrbart/bart_amr_parser.py:160
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/classifiers/transformer_regression_hf.py:57
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/classifiers/transformer_classifier_hf.py:57
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/lm/mlm.py:108
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/components/mtl/multi_task_learning.py:765
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/layers/embeddings/fast_text.py:150
Methodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/layers/embeddings/word2vec.py:210
Methodload_vocabs
Load vocabularies from a directory. Args: save_dir: The directory to load vocabularies. filename: The name for vocab
hanlp/common/transform.py:127
Methodload_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/amr/amrbart/bart_amr_generation.py:138
Methodload_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/classifiers/transformer_regression_hf.py:60
Methodload_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/components/classifiers/transformer_classifier_hf.py:60
Methodload_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/layers/embeddings/fast_text.py:153
Methodload_weights
(self, save_dir, filename='model.pt', **kwargs)
hanlp/layers/embeddings/word2vec.py:213
Functionloads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/seq2seq/dataset/penman.py:63
Functionloads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/common/penman_interface.py:69
Functionloads
(string, dereify=None, remove_wiki=False)
hanlp/components/amr/amrbart/preprocess/penman_interface.py:69
Methodlock
Lock each vocab.
hanlp/common/transform.py:163
Methodlock_vocabs
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:64
Methodlock_vocabs
(self)
hanlp/transform/conll_tf.py:318
Methodlock_vocabs
(self)
hanlp/transform/conll_tf.py:617
Methodlocked
(self)
hanlp/common/vocab_tf.py:145
Methodlocked
``True`` indicates this vocab is locked.
hanlp/common/vocab.py:188
Methodloss
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
Methodlower
(self)
hanlp/common/vocab_tf.py:210
Methodlp
(self)
hanlp/metrics/parsing/labeled_f1.py:77
Methodlp
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:77
Methodlp
(self)
hanlp/metrics/parsing/span.py:94
Methodlr
(self)
hanlp/metrics/parsing/labeled_f1.py:71
Methodlr
(self)
hanlp/metrics/parsing/labeled_f1_tf.py:71
Methodlr
(self)
hanlp/metrics/parsing/span.py:98
Functionls_resource_in_module
(root)
hanlp/utils/__init__.py:7
Functionmain
()
hanlp/transform/glue_tf.py:20
Functionmake_debug_corpus
(path, delimiter=None, percentage=0.1, max_samples=100)
hanlp/utils/io_util.py:50
Functionmake_raw_text_if_necessary
(home: str)
hanlp/datasets/srl/ontonotes5/_utils.py:642
Methodmapper
(X, Y)
hanlp/common/transform_tf.py:197
Methodmask_p
(self)
hanlp/transform/conll_tf.py:355
Functionmatch_decorator
(fn)
hanlp/utils/lang/en/english_tokenizer.py:167
Methodmax_seq_len
(self)
hanlp/datasets/lm/loaders/lm_dataset.py:119
Methodmax_seq_length
(self)
hanlp/components/taggers/transformers/transformer_transform_tf.py:28
Methodmax_seq_length
(self)
hanlp/transform/tsv_tf.py:74
Functionmean_model
(model: torch.nn.Module)
hanlp/utils/torch_util.py:150
Methodmerge
(self, other)
hanlp/common/vocab_tf.py:226
Methodmerge
Merge this with another vocab inplace. Args: other (Vocab): Another vocab.
hanlp/common/vocab.py:314
Functionmerge_head_deprel_with_2nd
(sample: dict)
hanlp/datasets/parsing/semeval15.py:48
Functionmerge_parts
(parts, offsets, words)
plugins/hanlp_demo/hanlp_demo/zh/tf/demo_cws_trie.py:35
Functionmerge_pos_into_con
(doc: Document)
plugins/hanlp_demo/hanlp_demo/zh/demo_parse_constituency.py:14
Methodmeta
(self)
hanlp/components/pipeline.py:157
Functionmmd_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
Methodmodel_
The actual model when it's wrapped by a `DataParallel` Returns: The "real" model
hanlp/common/torch_component.py:604
Methodmodule
(self, **kwargs)
hanlp/layers/embeddings/contextual_string_embedding.py:188
Methodmodule
(self, **kwargs)
hanlp/layers/embeddings/word2vec.py:348
Methodmodule
(self, training=True, **kwargs)
hanlp/layers/embeddings/contextual_word_embedding.py:159
Methodmodule
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_cnn.py:137
Methodmodule
(self, vocabs: VocabDict, **kwargs)
hanlp/layers/embeddings/char_rnn.py:105
Methodmodule
(self, **kwargs)
hanlp/layers/embeddings/embedding.py:117
Functionmst
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
Functionmst_then_greedy
(arc_scores, rel_scores, mask, root_rel_idx, rel_idx=None)
hanlp/components/parsers/parse_alg.py:234
← previousnext →2,501–2,600 of 2,968, ranked by callers