MCPcopy Create free account

hub / github.com/hankcs/HanLP / functions

Functions2,968 in github.com/hankcs/HanLP

↓ 1 callersMethod__init__
(self, transform: TransformerTransform = None)
hanlp/components/taggers/transformers/transformer_tagger_tf.py:27
↓ 1 callersMethod__init__
(self, config, embed: torch.nn.Module, context_layer: torch.nn.Module, label_space_size)
hanlp/components/ner/biaffine_ner/biaffine_ner_model.py:27
↓ 1 callersMethod__init__
Parameters ---------- prediction : numpy.ndarray a predicted dependency tree where prediction[dep_idx] = head_id
hanlp/components/parsers/parse_alg.py:14
↓ 1 callersMethod__init__
(self, encoder, decoder: CRFConstituencyDecoder)
hanlp/components/parsers/constituency/crf_constituency_model.py:196
↓ 1 callersMethod__init__
(self, encoder: ContextualWordEmbeddingModule, n_mlp_arc, n
hanlp/components/parsers/ud/ud_model.py:17
↓ 1 callersMethod__init__
(self, bert_text_transform=None)
hanlp/components/classifiers/transformer_classifier_tf.py:112
↓ 1 callersMethod__init__
(self, config, embed: torch.nn.Module, context_layer: torch.nn.Module, label_space_size)
hanlp/components/srl/span_rank/span_ranking_srl_model.py:470
↓ 1 callersMethod__init__
(self, input_size, hidden_size, num_layers=1, batch_first=False, bidirectional=False, dropout_in=0,
hanlp/components/srl/span_rank/highway_variational_lstm.py:21
↓ 1 callersMethod__init__
(self, n_rels, hidden_size, n_mlp_rel=300,
hanlp/components/srl/span_bio/baffine_tagging.py:16
↓ 1 callersMethod__init__
A sentence boundary detector using ngram as features and LSTM as encoder (:cite:`Schweter:Ahmed:2019`). It predicts whether a punctuation mark
hanlp/components/eos/ngram.py:71
↓ 1 callersMethod__init__
(self, hidden_size, config)
hanlp/components/mtl/tasks/dep_2nd.py:23
↓ 1 callersMethod__init__
A linear layer with an optional CRF (:cite:`lafferty2001conditional`) layer on top of it. Args: hidden_size: Size of hidden state
hanlp/components/mtl/tasks/pos.py:23
↓ 1 callersMethod__init__
(self, hidden_size, num_labels)
hanlp/components/mtl/tasks/lem.py:20
↓ 1 callersMethod__init__
(self, hidden_size, num_labels, secondary_encoder=None,
hanlp/components/mtl/tasks/ner/tag_ner.py:23
↓ 1 callersMethod__init__
(self, hidden_size, num_labels, crf=False)
hanlp/components/mtl/tasks/tok/tag_tok.py:24
↓ 1 callersMethod__init__
(self, trn: str = None, dev: str = None, tst: str = None, sampler_builder: SamplerBuilder = None,
hanlp/components/mtl/tasks/tok/reg_tok.py:49
↓ 1 callersMethod__init__
(self, out=sys.stderr)
hanlp/utils/log_util.py:69
↓ 1 callersMethod__init__
(self, filename, separator=',', append=False)
hanlp/callbacks/fine_csv_logger.py:35
↓ 1 callersMethod__init__
(self, nb_pred=0, nb_true=0, nb_correct=0)
hanlp/metrics/f1.py:10
↓ 1 callersMethod__init__
(self, mixture_range: Tuple[int, int], do_layer_norm: bool = False,
hanlp/layers/scalar_mix.py:51
↓ 1 callersMethod__init__
A contextual word embedding builder which builds a :class:`~hanlp.layers.embeddings.contextual_word_embedding.ContextualWordEmbeddingModule` a
hanlp/layers/embeddings/contextual_word_embedding.py:79
↓ 1 callersMethod__init__
A `CnnEncoder` is a combination of multiple convolution layers and max pooling layers. The input to this module is of shape `(batch_size, num_
hanlp/layers/embeddings/char_cnn.py:16
↓ 1 callersMethod__init__
Character level RNN embedding module. Args: field: The field in samples this encoder will work on. vocab_size: The si
hanlp/layers/embeddings/char_rnn.py:17
↓ 1 callersMethod__init__
Base class for embedding builders.
hanlp/layers/embeddings/embedding.py:28
↓ 1 callersMethod__init__
( self, initial_learning_rate, decay_schedule_fn, warmup_steps
hanlp/optimizers/adamw/optimization.py:29
↓ 1 callersMethod__init__
(self, id, type: Type, text=None)
hanlp/datasets/qa/hotpotqa.py:111
↓ 1 callersMethod__init__
(self, data: Union[str, List], transform: Union[Callable, List] = None,
hanlp/datasets/srl/loaders/conll2012.py:82
↓ 1 callersMethod__init__
CoNLL (:cite:`buchholz-marsi-2006-conll`) format template, see http://anthology.aclweb.org/W/W06/W06-2920.pdf Args: id (int):
plugins/hanlp_common/hanlp_common/conll.py:11
↓ 1 callersMethod__init__
(self, id=None, sentence=None, graph=None,
plugins/hanlp_common/hanlp_common/amr.py:85
↓ 1 callersMethod__init__
r""" A dict-like structure for fast custom dictionary strategies in tokenization and tagging. It is built with a dict of key-value pai
plugins/hanlp_trie/hanlp_trie/dictionary.py:54
↓ 1 callersMethod__init__
A node in a trie tree. Args: value: The value associated with this node.
plugins/hanlp_trie/hanlp_trie/trie.py:8
↓ 1 callersMethod__setitem__
(self, k: str, v: Vocab)
hanlp/common/transform.py:203
↓ 1 callersMethod__setitem__
(self, key, value)
plugins/hanlp_trie/hanlp_trie/trie.py:78
↓ 1 callersMethod__str__
(self)
plugins/hanlp_common/hanlp_common/conll.py:51
↓ 1 callersMethod_add_pointer_tokens
(self, graph: SemanticGraph)
hanlp/components/amr/seq2seq/dataset/linearization.py:382
↓ 1 callersMethod_build_cache
(self, dataset, verbose=HANLP_VERBOSE)
hanlp/common/dataset.py:522
↓ 1 callersMethod_build_extras
(self)
plugins/hanlp_common/hanlp_common/amr.py:294
↓ 1 callersFunction_canonicalize_clusters
The data might include 2 annotated spans which are identical, but have different ids. This checks all clusters for spans which are identi
hanlp/datasets/srl/loaders/ontonotes_loader.py:586
↓ 1 callersMethod_capture_config
Save arguments to config Args: locals_: Dict: exclude: (Default value = ('trn_data') 'dev_data': '
hanlp/common/torch_component.py:43
↓ 1 callersMethod_capture_config
Save arguments to config Parameters ---------- config `locals()` exclude
hanlp/common/keras_component.py:127
↓ 1 callersMethod_collapse_name_ops
(self, amr)
hanlp/components/amr/seq2seq/dataset/linearization.py:143
↓ 1 callersMethod_compute_normalizer
( self, emissions: torch.Tensor, mask: torch.ByteTensor)
hanlp/layers/crf/crf.py:227
↓ 1 callersMethod_compute_score
( self, emissions: torch.Tensor, tags: torch.LongTensor, mask: torch.ByteTensor)
hanlp/layers/crf/crf.py:188
↓ 1 callersMethod_create_dataloader
(self, dataset, batch_size, device, sampler, shuffle)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:73
↓ 1 callersMethod_create_dummy_placeholder_on
(device)
hanlp/common/torch_component.py:628
↓ 1 callersMethod_data_dep_init
Data dependent initialization. Args: inputs: Returns:
hanlp/layers/weight_normalization.py:197
↓ 1 callersMethod_do_use_weight_decay
Whether to use L2 weight decay for `param_name`. Args: param_name: Returns:
hanlp/optimizers/adamw/optimization.py:215
↓ 1 callersFunction_dp_decode_non_overlapping_spans
(starts, ends, scores, max_len, labels_inv, pred_id, u_constraint=False)
hanlp/components/srl/span_rank/inference_utils.py:147
↓ 1 callersMethod_encode
(self, batch, task_name, output_dict=None, cls_is_bos=False, sep_is_eos=False)
hanlp/components/mtl/multi_task_learning.py:695
↓ 1 callersFunction_find_cycle
( parents: List[int], length: int, current_nodes: List[bool] )
hanlp/components/parsers/chu_liu_edmonds.py:274
↓ 1 callersMethod_fix_and_make_graph
(self, nodes)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:354
↓ 1 callersMethod_fix_and_make_graph
(self, nodes)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:347
↓ 1 callersMethod_fix_and_make_graph
(self, nodes)
hanlp/components/amr/amrbart/model_interface/tokenization_bart.py:174
↓ 1 callersMethod_forward_brnn
(cell, input, masks, initial, drop_masks)
hanlp/components/srl/span_rank/layer.py:328
↓ 1 callersMethod_forward_rnn
(cell, input, masks, initial, drop_masks)
hanlp/components/srl/span_rank/layer.py:313
↓ 1 callersMethod_generate_chars_tags
(filepath, delimiter, max_seq_len)
hanlp/datasets/tokenization/loaders/chunking_dataset.py:32
↓ 1 callersFunction_get_file_size
(fp)
hanlp/utils/file_read_backwards/buffer_work_space.py:98
↓ 1 callersMethod_get_model_cls
(self, transformer: str)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:315
↓ 1 callersFunction_get_next_chunk
Return next chunk of data that we would from the file pointer. Args: fp: file previously_read_position: file pointer position that we
hanlp/utils/file_read_backwards/buffer_work_space.py:102
↓ 1 callersMethod_get_nodes_and_backreferences
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_bart.py:120
↓ 1 callersMethod_get_nodes_and_backreferences
(self, graph)
hanlp/components/amr/seq2seq/dataset/tokenization_t5.py:109
↓ 1 callersMethod_get_pad_dict
(self)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:77
↓ 1 callersMethod_get_raw_string
(self, sent: List[str], tokenizer)
hanlp/layers/embeddings/contextual_string_embedding_tf.py:97
↓ 1 callersFunction_get_what_to_read_next
Return information on which file pointer position to read from and how many bytes. Args: fp: past_read_positon: int chunk_size
hanlp/utils/file_read_backwards/buffer_work_space.py:121
↓ 1 callersMethod_init
()
hanlp/utils/lang/zh/char_table.py:31
↓ 1 callersMethod_init_new_embeddings
(model, tokenizer)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:325
↓ 1 callersMethod_init_norm
Set the weight g with the norm of the weight vector.
hanlp/layers/weight_normalization.py:189
↓ 1 callersMethod_initialize_weights
Initialize weight g. The initial value of g could either from the initial value in v, or by the input value if self.data_init
hanlp/layers/weight_normalization.py:164
↓ 1 callersMethod_interleave
(self, graph: SemanticGraph)
hanlp/components/amr/seq2seq/dataset/linearization.py:321
↓ 1 callersFunction_iob1_start_of_chunk
( prev_bio_tag: Optional[str], prev_conll_tag: Optional[str], curr_bio_tag: str,
hanlp/utils/span_util.py:450
↓ 1 callersFunction_is_partially_read_new_line
Return True when b is part of a new line separator found at index >= 1, False otherwise. Args: b: bytestring Returns: bool
hanlp/utils/file_read_backwards/buffer_work_space.py:189
↓ 1 callersMethod_linearize
(self, amr: penman.Graph)
hanlp/components/amr/seq2seq/dataset/linearization.py:179
↓ 1 callersFunction_list_dir
(path, home)
hanlp/datasets/parsing/ud/ud27.py:19
↓ 1 callersFunction_list_dir
(path, home)
hanlp/datasets/parsing/ud/ud210.py:19
↓ 1 callersFunction_list_dir
(path, home)
hanlp/datasets/parsing/ud/ud23.py:9
↓ 1 callersMethod_load
(path, vocab, normalize=False)
hanlp/layers/embeddings/word2vec_tf.py:45
↓ 1 callersMethod_load_vocabs
Args: vd: vocabs: vocab_cls: Default class for the new vocab
hanlp/common/transform.py:140
↓ 1 callersMethod_loss
(self, hidden, mask, gold_tags, output_dim)
hanlp/components/parsers/ud/tag_decoder.py:95
↓ 1 callersMethod_make_bio_labels
Copied from https://github.com/hiroki13/span-based-srl/blob/2c8b677c4e00b6c607e09ef4f9fe3d54961e4f2e/src/utils/sent.py#L42 Args: pr
hanlp/datasets/srl/loaders/conll2012.py:44
↓ 1 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:91
↓ 1 callersFunction_make_ptm
()
hanlp/datasets/parsing/pmt1.py:20
↓ 1 callersMethod_model_generate
(self, batch, beam_size)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:287
↓ 1 callersFunction_normalize_word
(word)
hanlp/datasets/srl/loaders/ontonotes_loader.py:579
↓ 1 callersFunction_post
(url, form: Dict[str, Any], headers: Dict[str, Any], timeout=60, verify=True)
plugins/hanlp_restful/hanlp_restful/__init__.py:16
↓ 1 callersMethod_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:907
↓ 1 callersMethod_process_coref_span_annotations_for_word
For a given coref label, add it to a currently open span(s), complete a span(s) or ignore it, if it is outside of all spans. This met
hanlp/datasets/srl/loaders/ontonotes_loader.py:369
↓ 1 callersMethod_process_span_annotations_for_word
Given a sequence of different label types for a single word and the current span label we are inside, compute the BIO tag for each la
hanlp/datasets/srl/loaders/ontonotes_loader.py:420
↓ 1 callersMethod_read_chunk
(fp, offset, length)
hanlp/datasets/lm/loaders/lm_dataset.py:124
↓ 1 callersFunction_reconstruct_graph_from_nodes
(nodes, backreferences)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:442
↓ 1 callersFunction_reconstruct_graph_from_nodes
(nodes, backreferences)
hanlp/components/amr/amrbart/common/postprocessing.py:314
↓ 1 callersMethod_remove_B_V
(labels)
hanlp/datasets/srl/loaders/conll2012.py:76
↓ 1 callersMethod_resize_final_logits_bias
(self, new_num_tokens: int)
hanlp/components/amr/amrbart/model_interface/modeling_bart.py:1297
↓ 1 callersMethod_send_get
(self, url, form: Dict[str, Any])
plugins/hanlp_restful/hanlp_restful/__init__.py:158
↓ 1 callersMethod_send_get_json
(self, url, form: Dict[str, Any])
plugins/hanlp_restful/hanlp_restful/__init__.py:167
↓ 1 callersFunction_split_name_ops
(graph)
hanlp/components/amr/seq2seq/dataset/postprocessing.py:405
↓ 1 callersFunction_split_name_ops
(graph)
hanlp/components/amr/amrbart/common/postprocessing.py:277
↓ 1 callersMethod_step
(self, optimizer, scheduler)
hanlp/components/amr/seq2seq/seq2seq_amr_parser.py:198
↓ 1 callersMethod_step
(self, optimizer, scheduler, grad_norm, transformer_grad_norm, lambda_scheduler)
hanlp/components/taggers/transformers/transformer_tagger.py:131
↓ 1 callersMethod_step
(self, optimizer, scheduler, grad_norm)
hanlp/components/parsers/constituency/crf_constituency_parser.py:176
↓ 1 callersMethod_step
(self, optimizer, scheduler, grad_norm)
hanlp/components/parsers/ud/ud_parser.py:315
← previousnext →601–700 of 2,968, ranked by callers