MCPcopy Index your code

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

↓ 2 callersFunctionconvert_to_dependency
(src, dst, language='zh', version='3.3.0', conllx=True, ud=False)
hanlp/datasets/parsing/loaders/_ctb_utils.py:76
↓ 2 callersFunctioncopy_cols
Copy the first 6 columns from gold file to pred file Args: gold_file: pred_file: copied_pred_file: keep_comments: (De
hanlp/metrics/parsing/conllx_eval.py:40
↓ 2 callersMethodcopy_from
(self, item)
plugins/hanlp_common/hanlp_common/structure.py:68
↓ 2 callersFunctioncopy_mask
(src: tf.Tensor, dst: tf.Tensor)
hanlp/utils/tf_util.py:160
↓ 2 callersFunctioncreate_optimizer
Creates an optimizer with learning rate schedule. Args: init_lr: num_train_steps: num_warmup_steps: weight_decay_rate:
hanlp/optimizers/adamw/__init__.py:35
↓ 2 callersFunctioncrf_decode
Decode the highest scoring sequence of tags in TensorFlow. This is a function for tensor. Args: potentials: A [batch_size, max_seq
hanlp/layers/crf/crf_tf.py:461
↓ 2 callersFunctioncrf_log_norm
Computes the normalization for a CRF. Args: inputs: A [batch_size, max_seq_len, num_tags] tensor of unary potentials to use as input to
hanlp/layers/crf/crf_tf.py:125
↓ 2 callersMethoddecode
(self, contextualized_embeddings, gold_starts, gold_ends, gold_labels, masks, max_sent_length,
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:106
↓ 2 callersMethoddecode
(self, arc_scores, rel_scores, mask, batch=None, predicting=None)
hanlp/components/parsers/biaffine/biaffine_2nd_dep.py:152
↓ 2 callersMethoddecode
(cls, raw_graph_string)
plugins/hanlp_common/hanlp_common/amr.py:688
↓ 2 callersFunctiondfs
(graph, start)
plugins/hanlp_common/hanlp_common/util.py:209
↓ 2 callersFunctiondfs_linearize
(graph, remove_pars=False, use_pointer_tokens=True)
hanlp/components/amr/amrbart/preprocess/read_and_process.py:50
↓ 2 callersMethodembed_np
(self, words: np.ndarray)
hanlp/layers/embeddings/fast_text_tf.py:44
↓ 2 callersFunctionembeddings_require_string_input
(embeddings)
hanlp/layers/embeddings/util_tf.py:78
↓ 2 callersMethodencode_plus
Tokenize and prepare for the model a sequence or a pair of sequences. .. warning:: This method is deprecated, ``__call__
hanlp/utils/lang/ja/bert_tok.py:17
↓ 2 callersFunctionend_of_chunk
(prev_tag, tag, prev_type, type_)
hanlp/metrics/chunking/conlleval.py:292
↓ 2 callersFunctionenumerate_spans
Given a sentence, return all token spans within the sentence. Spans are `inclusive`. Additionally, you can provide a maximum and minimum span
hanlp/utils/span_util.py:263
↓ 2 callersMethodevaluate_batch
(self, words, feats, arcs, rels, arc_loss, rel_loss, metric)
hanlp/components/parsers/biaffine_parser_tf.py:155
↓ 2 callersMethodevaluate_dataloader
(self, data, criterion, logger=None, ratio_width=None, metric=None, output=None, **kwargs)
hanlp/components/taggers/tagger.py:114
↓ 2 callersFunctionextract_ngram_features
(chars, bigram_only, window_size)
hanlp/transform/txt_tf.py:64
↓ 2 callersFunctionextract_ngram_features_and_tags
Feature extraction for windowed approaches See Also https://github.com/chqiwang/convseg/ Parameters ---------- sentence bigra
hanlp/transform/txt_tf.py:39
↓ 2 callersMethodfeed_batch
(self, batch)
hanlp/components/taggers/tagger.py:47
↓ 2 callersMethodfeed_batch
(self, batch: dict)
hanlp/components/taggers/transformers/transformer_tagger.py:269
↓ 2 callersFunctionfile_cache
(path: str, purge=False)
hanlp/utils/io_util.py:624
↓ 2 callersMethodfile_to_inputs
(self, filepath: str, gold=True)
hanlp/transform/conll_tf.py:72
↓ 2 callersMethodfile_to_inputs
(self, filepath: str, gold=True)
hanlp/transform/txt_tf.py:153
↓ 2 callersFunctionfilename_is_json
(filename)
plugins/hanlp_common/hanlp_common/io.py:35
↓ 2 callersFunctionfileno
(file_or_fd)
hanlp/utils/io_util.py:533
↓ 2 callersMethodfit
(self, trn_data: str, dev_data: str = None, save_dir: str = None, embeddings=100, embedding_trainable=False,
hanlp/components/ner/ner_tf.py:37
↓ 2 callersMethodfit
(self, trn_data, dev_data, save_dir, batch_size, epochs, run_eagerly=False, logger=None, verbose=True,
hanlp/common/keras_component.py:300
↓ 2 callersMethodfit
(self, trn_path: str, **kwargs)
hanlp/transform/conll_tf.py:255
↓ 2 callersMethodfit
(self, trn_path: str, **kwargs)
hanlp/transform/text_tf.py:34
↓ 2 callersMethodfit_dataloader
(self, trn: DataLoader, criterion, optimizer, metric, logger: logging.Logger, ratio_width=None,
hanlp/components/taggers/rnn_tagger.py:86
↓ 2 callersMethodflatten_emb
(self, emb)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:135
↓ 2 callersMethodformat_cell
(self, cell: str, min_width)
hanlp/callbacks/fine_csv_logger.py:27
↓ 2 callersMethodformat_dict_to_results
(data, outputs, exclusive_offset=False, with_predicate=False, with_argument=False,
hanlp/components/srl/span_rank/span_rank.py:291
↓ 2 callersFunctionformat_metrics
(metrics: List[tf.keras.metrics.Metric])
hanlp/utils/tf_util.py:198
↓ 2 callersFunctiongen_lemma_rule
Generates a lemma rule to transform the source to the target Args: form: lemma: allow_copy: (Default value = False) Ret
hanlp/components/parsers/ud/lemma_edit.py:35
↓ 2 callersFunctiongenerate_words_tags_from_tsv
(tsv_file_path, lower=False, gold=True, max_seq_length=None, sent_delimiter=None,
hanlp/utils/io_util.py:455
↓ 2 callersFunctionget_amr_utils
(amr_version)
hanlp/metrics/amr/smatch_eval.py:48
↓ 2 callersMethodget_batch_topk
(self, candidate_starts: torch.Tensor, candidate_ends, candidate_scores, topk_ratio, text_len,
hanlp/components/srl/span_rank/span_ranking_srl_model.py:249
↓ 2 callersFunctionget_callback_by_class
(callbacks: List[tf.keras.callbacks.Callback], cls)
hanlp/utils/tf_util.py:167
↓ 2 callersFunctionget_doc_key
(doc_id, part)
hanlp/datasets/srl/ontonotes5/_utils.py:28
↓ 2 callersMethodget_embedding
Build sinusoidal embeddings. This matches the implementation in tensor2tensor, but differs slightly from the description in Section 3.
hanlp/layers/transformers/relative_transformer.py:36
↓ 2 callersFunctionget_latest_info_from_pypi
(package='hanlp', repository_url='https://pypi.python.org/pypi/%s/json')
hanlp/utils/io_util.py:696
↓ 2 callersMethodget_list_node
(self, replace_copy=True)
plugins/hanlp_common/hanlp_common/amr.py:502
↓ 2 callersFunctionget_model_mirror
(transformer: str)
hanlp/layers/transformers/resource.py:36
↓ 2 callersMethodget_nodes
(self)
plugins/hanlp_common/hanlp_common/amr.py:488
↓ 2 callersMethodget_pos
Get the precisest pos for this word. Args: main_pos: Use the main pos (cpos or upos) or the minor pos (pos or xpos).
plugins/hanlp_common/hanlp_common/conll.py:71
↓ 2 callersFunctionget_positions
Get subj/obj position sequence. Args: start_idx: end_idx: length: Returns:
hanlp/transform/tacred_tf.py:15
↓ 2 callersMethodget_pred_ner
(self, sentences, span_scores)
hanlp/components/ner/biaffine_ner/biaffine_ner.py:368
↓ 2 callersMethodget_srl_loss_mask
(self, srl_scores, num_predicted_args, num_predicted_preds)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:362
↓ 2 callersMethodget_subtree
(self, root, max_depth)
plugins/hanlp_common/hanlp_common/amr.py:477
↓ 2 callersMethodget_token
(self, idx: int)
hanlp/common/vocab_tf.py:100
↓ 2 callersMethodget_token_idx
(self, token)
plugins/hanlp_common/hanlp_common/amr.py:846
↓ 2 callersMethodget_vector
(self, word: str)
hanlp/layers/embeddings/word2vec_tf.py:91
↓ 2 callersFunctionget_visible_gpus
()
hanlp/utils/tf_util.py:37
↓ 2 callersFunctiongroup_pa_by_p_
(srl)
hanlp/datasets/srl/loaders/conll2012.py:160
↓ 2 callersFunctionguess_delimiter
(tokens)
hanlp/utils/string_util.py:70
↓ 2 callersFunctionguess_tagging_scheme
(labels: List[str])
hanlp/components/taggers/util.py:8
↓ 2 callersFunctionindex_default
( item: T, list_: List[T], start: Optional[int] = None, stop: Optional[int] = None,
hanlp/components/amr/seq2seq/dataset/linearization.py:119
↓ 2 callersFunctionindex_of
(element, iterable, default=None, start=None, end=None)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:360
↓ 2 callersFunctionindex_of
(element, iterable, default=None, start=None, end=None)
hanlp/components/amr/amrbart/common/postprocessing.py:233
↓ 2 callersFunctionindex_word2vec_with_vocab
Args: filepath: The path to pretrained embedding. vocab: The vocabulary from training set. extend_vocab: Unlock vocabula
hanlp/layers/embeddings/util.py:14
↓ 2 callersFunctioninfer_space_after
(sent: List[str])
plugins/hanlp_common/hanlp_common/util.py:82
↓ 2 callersMethodinputs_to_samples
(self, inputs, gold=False)
hanlp/components/tokenizers/tok_tf.py:32
↓ 2 callersMethodinputs_to_samples
(self, inputs, gold=False)
hanlp/transform/conll_tf.py:210
↓ 2 callersMethodinside
(self, scores, mask, cands=None)
hanlp/components/parsers/constituency/treecrf.py:176
↓ 2 callersFunctioniobes_to_span
(words, tags)
hanlp/metrics/chunking/sequence_labeling.py:31
↓ 2 callersFunctionisprojective
r""" Checks if a dependency tree is projective. This also works for partial annotation. Besides the obvious crossing arcs, the examples b
plugins/hanlp_common/hanlp_common/conll.py:359
↓ 2 callersFunctionistree
r""" Checks if the arcs form an valid dependency tree. Args: sequence (list[int]): A list of head indices. proj (
hanlp/components/parsers/alg.py:318
↓ 2 callersMethodlayer_forward
(self, x, hx, cell, batch_sizes, reverse=False)
hanlp/components/parsers/biaffine/variationalbilstm.py:113
↓ 2 callersMethodlen_of_sent
(self, sent)
hanlp/transform/conll_tf.py:110
↓ 2 callersMethodlinearize
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:188
↓ 2 callersMethodlinearize
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:178
↓ 2 callersMethodload_config
(self, save_dir, filename='config.json')
hanlp/common/keras_component.py:163
↓ 2 callersFunctionload_from_meta
(meta: dict)
hanlp/utils/component_util.py:191
↓ 2 callersFunctionload_from_meta_file
Load a component from a ``meta.json`` (legacy TensorFlow component) or a ``config.json`` file. Args: save_dir: The identifier.
hanlp/utils/component_util.py:15
↓ 2 callersMethodload_language_model
(cls, model_file)
hanlp/layers/embeddings/contextual_string_embedding.py:52
↓ 2 callersMethodload_pickle
Load from path Args: path(str): file path Returns:
plugins/hanlp_common/hanlp_common/structure.py:47
↓ 2 callersMethodload_vocab
(self, save_dir, filename='vocab.json')
hanlp/common/transform.py:36
↓ 2 callersMethodload_vocabs
(self, save_dir, filename='vocabs.json')
hanlp/common/keras_component.py:183
↓ 2 callersFunctionload_word2vec_as_vocab_tensor
(path, delimiter=' ', cache=True)
hanlp/utils/torch_util.py:221
↓ 2 callersMethodlock_vocabs
(self)
hanlp/common/transform_tf.py:217
↓ 2 callersFunctionmake_ctb
(ctb_home)
hanlp/datasets/parsing/loaders/_ctb_utils.py:248
↓ 2 callersFunctionmake_gold_conll
(ontonotes_path, language)
hanlp/datasets/srl/ontonotes5/_utils.py:414
↓ 2 callersFunctionmakedirs
(path)
hanlp/utils/io_util.py:77
↓ 2 callersFunctionmerge_files
(files: List[str], dst: str)
hanlp/utils/io_util.py:632
↓ 2 callersFunctionmin_edit_script
Finds the minimum edit script to transform the source to the target Args: source: target: allow_copy: (Default value = False
hanlp/components/parsers/ud/lemma_edit.py:9
↓ 2 callersFunctionnew_doc
()
hanlp/datasets/ner/loaders/json_ner.py:96
↓ 2 callersFunctionnice_gpu
Use GPU nicely.
hanlp/utils/tf_util.py:55
↓ 2 callersMethodnormalize_chars
(chars: List[str])
hanlp/utils/lang/zh/char_table.py:27
↓ 2 callersMethodnum_samples_in
(self, dataset)
hanlp/common/keras_component.py:102
↓ 2 callersFunctionobject_from_classpath
(classpath, **kwargs)
plugins/hanlp_common/hanlp_common/reflection.py:26
↓ 2 callersMethodon_config_ready
Called when config is ready, either during ``fit`` or ``load``. Subclass can perform extra initialization tasks in this callback. Arg
hanlp/common/torch_component.py:594
↓ 2 callersMethodparse
Keywords lookup which takes a piece of text as input, and lookup all occurrences of keywords in it. These occurrences can overlap with each ot
plugins/hanlp_trie/hanlp_trie/trie.py:99
↓ 2 callersMethodpermute_hidden
(self, hx, permutation)
hanlp/components/parsers/biaffine/variationalbilstm.py:105
↓ 2 callersFunctionpipeline
Creates a pipeline of components. It's made for bundling `KerasComponents`. For `TorchComponent`, use :class:`~hanlp.components.mtl.multi_task_lea
hanlp/__init__.py:46
↓ 2 callersFunctionpm_load
Args: source: dereify: Restore reverted relations remove_wiki: Returns:
hanlp/components/amr/seq2seq/dataset/penman.py:44
↓ 2 callersFunctionpossible_tokenization
Enumerate all possible tokenizations of a text. Args: text: A text. Returns: All possible tokenizations.
hanlp/utils/string_util.py:99
← previousnext →401–500 of 2,968, ranked by callers