MCPcopy Create free account

hub / github.com/NJUNLP/GTS / functions

Functions52 in github.com/NJUNLP/GTS

↓ 8 callersMethodget_spans
(self, tags, length, token_range, type)
code/BertModel/utils.py:54
↓ 4 callersFunctionget_aspects
(tags, length, ignore_index=-1)
code/NNModel/utils.py:9
↓ 4 callersFunctionget_opinions
(tags, length, ignore_index=-1)
code/NNModel/utils.py:26
↓ 3 callersFunctionload_data_instances
(sentence_packs, word2index, args)
code/NNModel/data.py:91
↓ 3 callersFunctionload_data_instances
(sentence_packs, args)
code/BertModel/data.py:146
↓ 2 callersMethod_cls_logits
(self, features)
code/NNModel/model.py:47
↓ 2 callersFunctioneval
(model, dataset, args)
code/NNModel/main.py:81
↓ 2 callersFunctioneval
(model, dataset, args)
code/BertModel/main.py:63
↓ 2 callersFunctionfind_pair
(tags, aspect_spans, opinion_spans)
code/NNModel/utils.py:82
↓ 2 callersMethodfind_pair
(self, tags, aspect_spans, opinion_spans, token_ranges)
code/BertModel/utils.py:72
↓ 2 callersFunctionfind_triplet
(tags, aspect_spans, opinion_spans)
code/NNModel/utils.py:98
↓ 2 callersMethodfind_triplet
(self, tags, aspect_spans, opinion_spans, token_ranges)
code/BertModel/utils.py:90
↓ 2 callersMethodget_batch
(self, index)
code/NNModel/data.py:104
↓ 2 callersMethodget_batch
(self, index)
code/BertModel/data.py:160
↓ 2 callersFunctionget_spans
for BIO tag
code/NNModel/data.py:8
↓ 2 callersFunctionget_spans
for BIO tag
code/BertModel/data.py:10
↓ 2 callersMethodscore_aspect
(self)
code/BertModel/utils.py:121
↓ 2 callersMethodscore_opinion
(self)
code/BertModel/utils.py:140
↓ 2 callersMethodscore_uniontags
(self)
code/BertModel/utils.py:159
↓ 2 callersFunctiontest
(args)
code/NNModel/main.py:116
↓ 2 callersFunctiontest
(args)
code/BertModel/main.py:101
↓ 1 callersMethod__init__
(self, args)
code/NNModel/attention_module.py:61
↓ 1 callersMethod__init__
double embedding + lstm encoder + dot self attention
code/NNModel/model.py:10
↓ 1 callersMethod_get_embedding
(self, sentence_tokens, mask)
code/NNModel/model.py:33
↓ 1 callersMethod_lstm_feature
(self, embedding, lengths)
code/NNModel/model.py:41
↓ 1 callersFunctionattention
Compute 'Scaled Dot Product Attention
code/NNModel/attention_module.py:8
↓ 1 callersFunctionclones
Produce N identical layers.
code/NNModel/attention_module.py:21
↓ 1 callersMethodforward
(self, sentence_tokens, lengths, mask)
code/NNModel/model.py:86
↓ 1 callersMethodforward_perceptron
(self, query, value, mask)
code/NNModel/attention_module.py:90
↓ 1 callersMethodmulti_hops
generate mask
code/NNModel/model.py:52
↓ 1 callersMethodmulti_hops
generate mtraix mask
code/NNModel/model.py:128
↓ 1 callersMethodmulti_hops
generate mask
code/BertModel/model.py:19
↓ 1 callersFunctiontrain
(args)
code/NNModel/main.py:18
↓ 1 callersFunctiontrain
(args)
code/BertModel/main.py:16
Method__init__
Take in model size and number of heads.
code/NNModel/attention_module.py:27
Method__init__
(self, sentence_pack, word2index, args)
code/NNModel/data.py:29
Method__init__
(self, instances, args)
code/NNModel/data.py:99
Method__init__
(self, gen_emb, domain_emb, args)
code/NNModel/model.py:104
Method__init__
(self, args, predictions, goldens, bert_lengths, sen_lengths, tokens_ranges, ignore_index=-1)
code/BertModel/utils.py:44
Method__init__
(self, tokenizer, sentence_pack, args)
code/BertModel/data.py:52
Method__init__
(self, instances, args)
code/BertModel/data.py:155
Method__init__
(self, args)
code/BertModel/model.py:8
Methodforward
Implements Figure 2
code/NNModel/attention_module.py:38
Methodforward
(self, query, value, mask)
code/NNModel/attention_module.py:73
Methodforward
(self, x, x_len, x_mask)
code/NNModel/model.py:162
Methodforward
(self, tokens, masks)
code/BertModel/model.py:53
Functionget_aspects
(tags, length, ignore_index=-1)
code/BertModel/utils.py:9
Functionget_evaluate_spans
for BIO tag
code/BertModel/data.py:30
Functionget_opinions
(tags, length, ignore_index=-1)
code/BertModel/utils.py:26
Functionscore_aspect
(predicted, golden, lengths, ignore_index=-1)
code/NNModel/utils.py:42
Functionscore_opinion
(predicted, golden, lengths, ignore_index=-1)
code/NNModel/utils.py:62
Functionscore_uniontags
(args, predicted, golden, lengths, ignore_index=-1)
code/NNModel/utils.py:124