MCPcopy Create free account

hub / github.com/brightmart/text_classification / functions

Functions642 in github.com/brightmart/text_classification

↓ 17 callersMethod_read_tsv
Reads a tab separated value file.
a00_Bert/unused/run_classifier_multi_labels_bert.py:186
↓ 17 callersFunctioncreate_voabulary
(simple=None,word2vec_model_path='../zhihu-word2vec-title-desc.bin-100',name_scope='')
a07_Transformer/data_util_zhihu.py:13
↓ 17 callersFunctioncreate_voabulary_label
(voabulary_label='../train-zhihu4-only-title-all.txt',name_scope='',use_seq2seq=False)
a07_Transformer/data_util_zhihu.py:45
↓ 12 callersFunctioncreate_voabulary_label
(voabulary_label='train-zhihu4-only-title-all.txt',name_scope='',use_seq2seq=False)
a02_TextCNN/other_experiement/data_util_zhihu.py:47
↓ 11 callersFunctioncreate_voabulary
(simple=None,word2vec_model_path='zhihu-word2vec-title-desc.bin-100',name_scope='')
a02_TextCNN/other_experiement/data_util_zhihu.py:15
↓ 10 callersFunctioncreate_initializer
Creates a `truncated_normal_initializer` with the given range.
a00_Bert/bert_modeling.py:387
↓ 9 callersFunctiondropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepi
a00_Bert/bert_modeling.py:356
↓ 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:
a00_Bert/bert_modeling.py:915
↓ 9 callersFunctionload_data_predict
(vocabulary_word2index,vocabulary_word2index_label,questionid_question_lists,uni_to_tri_gram=False)
a07_Transformer/data_util_zhihu.py:416
↓ 9 callersFunctionload_data_predict
(vocabulary_word2index,vocabulary_word2index_label,questionid_question_lists,uni_to_tri_gram=False)
a02_TextCNN/other_experiement/data_util_zhihu.py:418
↓ 9 callersFunctionload_final_test_data
(file_path)
a07_Transformer/data_util_zhihu.py:405
↓ 9 callersFunctionload_final_test_data
(file_path)
a02_TextCNN/other_experiement/data_util_zhihu.py:407
↓ 7 callersFunctioncreate_voabulary
(simple=None,word2vec_model_path='zhihu-word2vec-title-desc.bin-100',name_scope='')
aa1_data_util/data_util_zhihu.py:13
↓ 7 callersFunctionload_data_multilabel_new
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list re
a07_Transformer/data_util_zhihu.py:117
↓ 6 callersMethodactivation
(self,features, scope=None)
a08_EntityNetwork/a3_entity_network.py:128
↓ 6 callersMethodget_pooled_output
(self)
a00_Bert/bert_modeling.py:246
↓ 5 callersFunctioncreate_voabulary_label
(voabulary_label='train-zhihu4-only-title-all.txt',name_scope='',use_seq2seq=False)
aa1_data_util/data_util_zhihu.py:45
↓ 5 callersMethodsub_layer_layer_norm_residual_connection
layer norm & residual connection :param input: [batch_size,equence_length,d_model] :param output:[batch_size,sequence_leng
a07_Transformer/a2_base_model.py:65
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
a00_Bert/tokenization.py:85
↓ 4 callersFunctioncreate_int_feature
(values)
a00_Bert/unused/run_classifier_multi_labels_bert.py:571
↓ 4 callersFunctionget_target_label_short_batch
(eval_y_big)
a00_Bert/utils.py:187
↓ 4 callersFunctionload_data
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list repre
aa1_data_util/data_util_zhihu.py:263
↓ 4 callersMethodsub_layer_multi_head_attention
multi head attention as sub layer :param layer_index: index of layer number :param Q: shape should be: [batch_size,sequenc
a07_Transformer/a2_base_model.py:42
↓ 4 callersMethodtokenize
(self, text)
a00_Bert/tokenization.py:119
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
a00_Bert/unused/run_classifier_multi_labels_bert.py:267
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
a00_Bert/unused/run_classifier_multi_labels_bert.py:307
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
a00_Bert/unused/run_classifier_multi_labels_bert.py:347
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
a00_Bert/unused/run_classifier_multi_labels_bert.py:393
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
a00_Bert/unused/run_classifier_multi_labels_bert.py:438
↓ 3 callersFunctionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
a00_Bert/tokenization.py:27
↓ 3 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_train.py:182
↓ 3 callersFunctiondo_eval
(sess,fast_text,evalX,evalY,batch_size,vocabulary_index2word_label)
a01_FastText/p6_fastTextB_train_multilabel.py:124
↓ 3 callersFunctiondo_eval
(sess, textCNN, evalX, evalY, num_classes)
a02_TextCNN/p7_TextCNN_train.py:131
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
a00_Bert/unused/run_classifier_multi_labels_bert.py:558
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
a00_Bert/unused/run_classifier_multi_labels_bert.py:591
↓ 3 callersFunctionget_unique_labels
(length=5)
a07_Transformer/a2_transformer.py:282
↓ 3 callersFunctionget_unique_labels
(length=5)
a07_Transformer/a2_transformer_classification.py:219
↓ 3 callersFunctionlayer_norm
Run layer normalization on the last dimension of the tensor.
a00_Bert/bert_modeling.py:374
↓ 3 callersFunctionload_data_multilabel_new
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list repre
a02_TextCNN/other_experiement/data_util_zhihu.py:119
↓ 3 callersMethodmulti_head_attention_fn
multi head attention :param Q: query. shape:[batch,sequence_length,d_model] :param K_s: keys. shape:[batch,sequence_lengt
a07_Transformer/a2_multi_head_attention.py:34
↓ 3 callersFunctionreshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
a00_Bert/bert_modeling.py:952
↓ 3 callersMethodsub_layer_postion_wise_feed_forward
:param x: shape should be:[batch_size,sequence_length,d_model] :param layer_index: index of layer number :param type: enco
a07_Transformer/a2_base_model.py:30
↓ 3 callersMethodtrain
based on the loss, use SGD to update parameter
a02_TextCNN/p7_TextCNN_model.py:191
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a peice of text.
a00_Bert/tokenization.py:101
↓ 3 callersFunctionwrite_data_to_file_system
(file_name, data)
aa1_data_util/1_process_zhihu.py:113
↓ 3 callersFunctionwrite_data_to_file_system
(file_name, data)
aa1_data_util/3_process_zhihu_question_topic_relation.py:134
↓ 3 callersFunctionwrite_data_to_file_system_multilabel
(file_name, data)
aa1_data_util/1_process_zhihu.py:122
↓ 2 callersMethodapply_gradients
See base class.
a00_Bert/optimization.py:105
↓ 2 callersMethodattention
:param input_sequence: [batch_size,seq_length,num_units] :param attention_level: word or sentence level :return: [batch_size,
a05_HierarchicalAttentionNetwork/HAN_model.py:101
↓ 2 callersMethodattention_encoder_decoder_fn
(self)
a07_Transformer/a2_attention_between_enc_dec.py:35
↓ 2 callersMethodbi_lstm
:param input_sequences: [batch_size,seq_lenght,num_units] :param level: word or sentence :param reuse_flag: resuse or not
a05_HierarchicalAttentionNetwork/HAN_model.py:119
↓ 2 callersFunctioncompute_confuse_matrix_batch
compute confuse matrix for a batch :param y_targetlabel_list: a list; each element is a mulit-hot,e.g. [1,0,0,1,...] :param y_logits_arra
a00_Bert/utils.py:239
↓ 2 callersFunctioncompute_f1
compute f1 :param TP_micro: number.e.g. 200 :param FP_micro: number.e.g. 200 :param FN_micro: number.e.g. 200 :return: f1_score:
a00_Bert/utils.py:154
↓ 2 callersFunctioncompute_micro_macro
compute f1 of micro and macro :param label_dict: :return: f1_micro,f1_macro: scalar, scalar
a00_Bert/utils.py:104
↓ 2 callersMethodconv_relu_pool_dropout
(self,sentence_embeddings_expanded, name_scope_prefix=None)
aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_model.py:72
↓ 2 callersFunctionconvert_int_to_one_hot
(number,label_size)
aa2_ClassificationTflearn/p2_classification_tflearn_demo.py:17
↓ 2 callersFunctionconvert_int_to_one_hot
(number,label_size)
aa2_ClassificationTflearn/p2_classification_tflearn.py:17
↓ 2 callersFunctionconvert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
a00_Bert/unused/run_classifier_multi_labels_bert.py:452
↓ 2 callersMethodconvert_tokens_to_ids
(self, tokens)
a00_Bert/tokenization.py:127
↓ 2 callersFunctioncreate_voabulary
(simple=None,word2vec_model_path='../zhihu-word2vec-title-desc.bin-100',name_scope='')
a08_EntityNetwork/data_util_zhihu.py:13
↓ 2 callersFunctioncreate_voabulary_label
(voabulary_label='train-zhihu4-only-title-all.txt',name_scope='',use_seq2seq=False)
a08_EntityNetwork/data_util_zhihu.py:45
↓ 2 callersMethoddecoder_fn
(self)
a07_Transformer/a2_decoder.py:43
↓ 2 callersMethoddecoder_single_layer
singel layer for decoder. each layers has three sub-layers: the first is multi-head self-attention(mask) mechanism; the se
a07_Transformer/a2_decoder.py:54
↓ 2 callersFunctiondo_eval
(sess,model,evalX,evalY,batch_size,vocabulary_index2word_label,eval_decoder_input=None)
a09_DynamicMemoryNet/a8_train.py:177
↓ 2 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_train.py:152
↓ 2 callersFunctiondo_eval
(sess,model,evalX,evalY,batch_size,vocabulary_index2word_label,eval_decoder_input=None)
a07_Transformer/a2_train.py:180
↓ 2 callersFunctiondo_eval
(sess,model,evalX,evalY,batch_size,vocabulary_index2word_label,eval_decoder_input=None)
a07_Transformer/a2_train_classification.py:173
↓ 2 callersFunctiondo_eval
(sess,fast_text,evalX,evalY,batch_size)
a01_FastText/old_single_label/p5_fastTextB_train.py:150
↓ 2 callersFunctiondo_eval
(sess,twoCNNTR,evalX,evalX2,evalY,batch_size,vocabulary_index2word_label)
aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_train.py:150
↓ 2 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a02_TextCNN/other_experiement/p7_TextCNN_train_exp_512_0609.py:171
↓ 2 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a02_TextCNN/other_experiement/p7_TextCNN_train_exp.py:153
↓ 2 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a02_TextCNN/other_experiement/p7_TextCNN_train_exp512.py:156
↓ 2 callersFunctiondo_eval
(sess,biLstmTR,evalX,evalY,batch_size,vocabulary_index2word_label)
aa5_BiLstmTextRelation/p9_BiLstmTextRelation_train.py:150
↓ 2 callersFunctiondo_eval
(sess,textRNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a03_TextRNN/p8_TextRNN_train.py:141
↓ 2 callersFunctiondo_eval
(sess,model,evalX,evalY,batch_size,vocabulary_index2word_label,eval_decoder_input=None)
a08_EntityNetwork/a3_train.py:179
↓ 2 callersFunctiondo_eval
(sess,model,evalX,evalY,batch_size,vocabulary_index2word_label,eval_decoder_input=None)
a06_Seq2seqWithAttention/a1_seq2seq_attention_train.py:175
↓ 2 callersFunctiondo_eval
(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_label)
a04_TextRCNN/p71_TextRCNN_train.py:149
↓ 2 callersMethodencoder_fn
(self)
a07_Transformer/a2_encoder.py:33
↓ 2 callersMethodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
a00_Bert/bert_modeling.py:90
↓ 2 callersFunctionget_input_mask_segment_ids
get input mask and segment ids given a batch of input x. if sequence length of input x is max_sequence_length, then shape of both input_mask
a00_Bert/train_bert_multi-label.py:175
↓ 2 callersFunctionget_input_mask_segment_ids
get input mask and segment ids given a batch of input x. if sequence length of input x is max_sequence_length, then shape of both input_mask
a00_Bert/unused/train_bert_multi-label_old.py:175
↓ 2 callersFunctionget_label_using_logits_batch
(prob,top_number=5)
a00_Bert/utils.py:213
↓ 2 callersFunctionget_logits_with_value_by_input
(start,end)
a02_TextCNN/p7_TextCNN_predict.py:84
↓ 2 callersFunctionget_logits_with_value_by_input_exp
(start,end)
a02_TextCNN/other_experiement/p7_TextCNN_predict_exp.py:81
↓ 2 callersMethodgru_cell
single step of gru :param Xt: Xt:[batch_size,hidden_size] :param h_t_minus_1:[batch_size,hidden_size] :return:[ba
a09_DynamicMemoryNet/a8_dynamic_memory_network.py:222
↓ 2 callersMethodgru_forward
:param embedded_words:[None,sequence_length, self.embed_size] :return:forward hidden state: a list.length is sentence_length, each el
a06_Seq2seqWithAttention/a1_seq2seq_attention_model.py:151
↓ 2 callersMethodgru_single_step_sentence_level
single step of gru for sentence level :param Xt:[batch_size, hidden_size*2] :param h_t_minus_1:[batch_size, hidden_size*2]
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:232
↓ 2 callersMethodgru_single_step_sentence_level
single step of gru for sentence level :param Xt:[batch_size, hidden_size*2] :param h_t_minus_1:[batch_size, hidden_size*2]
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:250
↓ 2 callersMethodgru_single_step_word_level
single step of gru for word level :param Xt: Xt:[batch_size*num_sentences,embed_size] :param h_t_minus_1:[batch_size*num_sent
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:213
↓ 2 callersMethodgru_single_step_word_level
single step of gru for word level :param Xt: Xt:[batch_size*num_sentences,embed_size] :param h_t_minus_1:[batch_size*num_sent
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:231
↓ 2 callersFunctioninit_label_dict
init label dict. this dict will be used to save TP,FP,FN :param num_classes: :return: label_dict: a dict. {label_index:(0,0,0)}
a00_Bert/utils.py:169
↓ 2 callersMethodlayer_norm_residual_connection
(self)
a07_Transformer/a2_layer_norm_residual_conn.py:16
↓ 2 callersFunctionload_data
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb :param cache_file_h5py: :param
a00_Bert/utils.py:11
↓ 2 callersMethodposition_wise_feed_forward_fn
x: [batch,sequence_length,d_model] :return: [batch,sequence_length,d_model]
a07_Transformer/a2_poistion_wise_feed_forward.py:35
↓ 2 callersFunctionreshape_from_matrix
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
a00_Bert/bert_modeling.py:966
↓ 2 callersFunctiontransform_multilabel_as_multihot
:param label_list: e.g.[0,1,4] :param label_size: e.g.199 :return:e.g.[1,1,0,1,0,0,........]
aa1_data_util/data_util_zhihu.py:386
↓ 2 callersFunctiontransform_multilabel_as_multihot
:param label_list: e.g.[0,1,4] :param label_size: e.g.199 :return:e.g.[1,1,0,1,0,0,........]
a07_Transformer/data_util_zhihu.py:386
↓ 2 callersFunctiontransform_multilabel_as_multihot
:param label_list: e.g.[0,1,4] :param label_size: e.g.199 :return:e.g.[1,1,0,1,0,0,........]
a02_TextCNN/other_experiement/data_util_zhihu.py:388
↓ 2 callersFunctiontransform_multilabel_as_multihot
:param label_list: e.g.[0,1,4] :param label_size: e.g.199 :return:e.g.[1,1,0,1,0,0,........]
a08_EntityNetwork/data_util_zhihu.py:386
↓ 2 callersFunctiontranspose_for_scores
(input_tensor, batch_size, num_attention_heads, seq_length, width)
a00_Bert/bert_modeling.py:649
next →1–100 of 642, ranked by callers