MCPcopy Create free account

hub / github.com/WenRichard/KBQA-BERT / functions

Functions292 in github.com/WenRichard/KBQA-BERT

↓ 240 callersMethodappend
(self, word, start, end, tag)
terminal_predict.py:417
↓ 16 callersMethodtokenize
(self, text)
bert/tokenization.py:119
↓ 11 callersMethod_read_tsv
Reads a tab separated value file.
bert/run_classifier.py:178
↓ 11 callersMethodconvert_tokens_to_ids
(self, tokens)
bert/tokenization.py:127
↓ 11 callersFunctioncreate_int_feature
(values)
bert/run_classifier.py:463
↓ 10 callersFunctioncreate_initializer
Creates a `truncated_normal_initializer` with the given range.
bert/modeling.py:376
↓ 9 callersFunctionget_shape_list
Returns a list of the shape of tensor, preferring static dimensions. Args: tensor: A tf.Tensor object to find the shape of. expected_rank:
bert/modeling.py:897
↓ 8 callersMethodclose
(self)
bert/run_squad.py:1092
↓ 8 callersFunctioncreate_int_feature
(values)
run_ner.py:371
↓ 8 callersMethodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
bert/modeling.py:90
↓ 7 callersMethodpredict
(self, sentence1, sentence2)
run_similarity.py:657
↓ 6 callersFunctioncreate_int_feature
(values)
bert/create_pretraining_data.py:166
↓ 6 callersFunctionmetrics_from_confusion_matrix
Precision, Recall and F1 from the confusion matrix Parameters ---------- cm : tf.Tensor of type tf.int32, of shape (num_classes, num_class
tf_metrics.py:168
↓ 6 callersFunctionsafe_div
Safe division, return 0 if denominator is 0
tf_metrics.py:137
↓ 5 callersMethodtokenize
Tokenizes a piece of text.
bert/tokenization.py:145
↓ 5 callersMethodtrain
(self)
run_similarity.py:587
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
bert/tokenization.py:85
↓ 4 callersFunctiondropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepi
bert/modeling.py:345
↓ 4 callersMethodget_labels
(self)
run_similarity.py:113
↓ 4 callersMethodget_pooled_output
(self)
bert/modeling.py:235
↓ 4 callersMethodget_sequence_output
Gets final hidden layer of encoder. Returns: float Tensor of shape [batch_size, seq_length, hidden_size] corresponding to the final h
bert/modeling.py:238
↓ 4 callersMethodset_mode
(self, mode)
run_similarity.py:128
↓ 4 callersFunctionupload_data
(sql)
Data/load_dbdata.py:72
↓ 3 callersMethod_create_example
(self, lines, set_type)
run_ner.py:223
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
bert/run_classifier.py:259
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
bert/run_classifier.py:299
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
bert/run_classifier.py:339
↓ 3 callersMethod_read_data
Reads a BIO data.
run_ner.py:177
↓ 3 callersFunctionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
bert/tokenization.py:27
↓ 3 callersFunctionevaluate
(iterable, options=None)
conlleval.py:64
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
bert/run_classifier.py:450
↓ 3 callersFunctionfile_based_input_fn_builder
(input_file, seq_length, is_training, drop_remainder)
run_ner.py:386
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
bert/run_classifier.py:477
↓ 3 callersFunctionfiled_based_convert_examples_to_features
将数据转化为TF_Record 结构,作为模型数据输入 :param examples: 样本 :param label_list:标签list :param max_seq_length: 预先设定的最大序列长度 :param tokenizer: to
run_ner.py:350
↓ 3 callersMethodget_estimator
(self)
run_similarity.py:254
↓ 3 callersMethodids_tensor
Creates a random int32 tensor of the shape within the vocab size.
bert/modeling_test.py:147
↓ 3 callersFunctionlayer_norm
Run layer normalization on the last dimension of the tensor.
bert/modeling.py:363
↓ 3 callersFunctionprint_output
(data, type)
terminal_predict.py:213
↓ 3 callersFunctionreshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
bert/modeling.py:934
↓ 3 callersFunctionstring_output
(data)
terminal_predict.py:219
↓ 3 callersMethodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the given voca
bert/tokenization.py:257
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a peice of text.
bert/tokenization.py:101
↓ 2 callersFunction_decode_record
(record, name_to_features)
run_ner.py:396
↓ 2 callersFunction_get_best_indexes
Get the n-best logits from a list.
bert/run_squad.py:1022
↓ 2 callersFunction_strip_spaces
(text)
bert/run_squad.py:954
↓ 2 callersMethod_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
run_similarity.py:411
↓ 2 callersMethod_witch_cell
RNN 类型 :return:
lstm_crf_layer.py:64
↓ 2 callersMethodapply_gradients
See base class.
bert/optimization.py:105
↓ 2 callersFunctioncalculate_metrics
(correct, guessed, total)
conlleval.py:152
↓ 2 callersFunctioncompute_loss
(logits, positions)
bert/run_squad.py:645
↓ 2 callersFunctionconvert
(line)
terminal_predict.py:92
↓ 2 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s.
bert/run_squad.py:309
↓ 2 callersFunctionconvert_id_to_label
将id形式的结果转化为真实序列结果 :param pred_ids_result: :param idx2label: :return:
terminal_predict.py:185
↓ 2 callersFunctionconvert_single_example
将一个样本进行分析,然后将字转化为id, 标签转化为id,然后结构化到InputFeatures对象中 :param ex_index: index :param example: 一个样本 :param label_list: 标签列表 :param ma
terminal_predict.py:243
↓ 2 callersFunctionconvert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
bert/run_classifier.py:358
↓ 2 callersFunctioncreate_model
创建X模型 :param bert_config: bert 配置 :param is_training: :param input_ids: 数据的idx 表示 :param input_mask: :param segment_ids:
run_ner.py:421
↓ 2 callersFunctionend_of_chunk
(prev_tag, tag, prev_type, type_)
conlleval.py:233
↓ 2 callersFunctionestimate_answer
:param candidate: :param answer: :return:
kbqa_test.py:79
↓ 2 callersMethodfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
run_similarity.py:517
↓ 2 callersMethodfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_similarity.py:542
↓ 2 callersMethodget_all_encoder_layers
(self)
bert/modeling.py:247
↓ 2 callersMethodget_train_examples
(self, data_dir)
run_similarity.py:69
↓ 2 callersFunctioninput_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
bert/run_squad.py:686
↓ 2 callersFunctioninput_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
bert/run_pretraining.py:324
↓ 2 callersFunctionmetrics
(counts)
conlleval.py:160
↓ 2 callersFunctionparse_args
(argv)
conlleval.py:42
↓ 2 callersFunctionparse_tag
(t)
conlleval.py:59
↓ 2 callersFunctionpr_re_fbeta
Uses a confusion matrix to compute precision, recall and fbeta
tf_metrics.py:145
↓ 2 callersFunctionread_squad_examples
Read a SQuAD json file into a list of SquadExample.
bert/run_squad.py:227
↓ 2 callersFunctionreshape_from_matrix
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
bert/modeling.py:948
↓ 2 callersFunctionstart_of_chunk
(prev_tag, tag, prev_type, type_)
conlleval.py:258
↓ 2 callersFunctionstrage_combined_link_org_loc
组合策略 :param pred_label_result: :param types: :return:
terminal_predict.py:206
↓ 2 callersFunctiontranspose_for_scores
(input_tensor, batch_size, num_attention_heads, seq_length, width)
bert/modeling.py:631
↓ 1 callersMethod__repr__
(self)
bert/run_squad.py:182
↓ 1 callersMethod__str__
(self)
bert/create_pretraining_data.py:76
↓ 1 callersMethod_bi_dir_rnn
双向RNN :return:
lstm_crf_layer.py:79
↓ 1 callersFunction_check_is_max_context
Check if this is the 'max context' doc span for the token.
bert/run_squad.py:512
↓ 1 callersMethod_clean_text
Performs invalid character removal and whitespace cleanup on text.
bert/tokenization.py:235
↓ 1 callersFunction_compute_softmax
Compute softmax probability over raw logits.
bert/run_squad.py:1034
↓ 1 callersFunction_decode_record
Decodes a record to a TensorFlow example.
bert/run_squad.py:700
↓ 1 callersFunction_decode_record
Decodes a record to a TensorFlow example.
bert/run_pretraining.py:391
↓ 1 callersFunction_decode_record
Decodes a record to a TensorFlow example.
bert/run_classifier.py:488
↓ 1 callersMethod_do_use_weight_decay
Whether to use L2 weight decay for `param_name`.
bert/optimization.py:156
↓ 1 callersMethod_get_variable_name
Get the variable name from the tensor name.
bert/optimization.py:166
↓ 1 callersFunction_improve_answer_span
Returns tokenized answer spans that better match the annotated answer.
bert/run_squad.py:475
↓ 1 callersMethod_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
bert/tokenization.py:213
↓ 1 callersFunction_is_control
Checks whether `chars` is a control character.
bert/tokenization.py:323
↓ 1 callersFunction_is_punctuation
Checks whether `chars` is a punctuation character.
bert/tokenization.py:335
↓ 1 callersFunction_is_whitespace
Checks whether `chars` is a whitespace character.
bert/tokenization.py:311
↓ 1 callersMethod_run_split_on_punc
Splits punctuation on a piece of text.
bert/tokenization.py:180
↓ 1 callersMethod_run_strip_accents
Strips accents from a piece of text.
bert/tokenization.py:169
↓ 1 callersMethod_tokenize_chinese_chars
Adds whitespace around any CJK character.
bert/tokenization.py:200
↓ 1 callersFunction_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
bert/run_classifier.py:524
↓ 1 callersFunction_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
bert/extract_features.py:302
↓ 1 callersMethodadd_blstm_crf_layer
blstm-crf网络 :return:
lstm_crf_layer.py:42
↓ 1 callersMethodassert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
bert/modeling_test.py:162
↓ 1 callersFunctionassert_rank
Raises an exception if the tensor rank is not of the expected rank. Args: tensor: A tf.Tensor to check the rank of. expected_rank: Python i
bert/modeling.py:961
↓ 1 callersFunctionattention_layer
Performs multi-headed attention from `from_tensor` to `to_tensor`. This is an implementation of multi-headed attention based on "Attention is all
bert/modeling.py:560
↓ 1 callersMethodblstm_layer
:return:
lstm_crf_layer.py:88
↓ 1 callersMethodcheck_output
(self, result)
bert/modeling_test.py:114
next →1–100 of 292, ranked by callers