xuuuluuu / position-aware-tagging-for-aste Goto Github PK
View Code? Open in Web Editor NEWCode and models for the paper " Position-Aware Tagging for Aspect Sentiment Triplet Extraction", EMNLP 2020.
Code and models for the paper " Position-Aware Tagging for Aspect Sentiment Triplet Extraction", EMNLP 2020.
您好,在运行您的项目时我有以下几个问题想要请教:
在您的项目中对于batch_size>1的相关处理代码还是抽象方法:
比如triplet/hypergraph/NeuralBuilder.py 中的 def generate_batches(self, train_insts, batch_size)和def build_nn_graph_batch(self, batch_input_seqs);
请问这部分您后来有更新吗?
不使用bert,您的代码可以正常运行;但是使用bert会出现out-of-memory的问题,不知道您是否有什么优化方法?
当我尝试复现opinion_offset=7(即论文中的M=6)的结果时,运行速度有些过慢:以res15为例:
Start Training...
toal num of entity: 249
total num of prediction: 157
Dev -- (Precision=57.32%, Recall=36.14%, FScore=44.33%) Time=1096.56s
�[31mSave the best model to �[0m best_model.pt
toal num of entity: 485
total num of prediction: 298
�[31mTest -- �[0m (Precision=52.68%, Recall=32.37%, FScore=40.10%) Time=2766.03s
�[33mIteration �[0m 0 : Obj= 4704.674016952515 Time=5640.75s
请问您在实验时,对于M较大的情况,速度也是如此吗?
Hello, could you please point me to the script that was used to convert 'ASTE-Data-V2' data to 'triplet_data' format?
Hello,
I'm following your readme on Win OS and I get this error. Any hints? I read around that I need to change the int to Long but I'm not sure where and which file.
(JET) PS C:\Users\sp\.conda\envs\JET\Position-Aware-Tagging-for-ASTE> python jet_o.py
# of original triplets: 1460
# of triplets for current setup: 601
# of original triplets: 346
# of triplets for current setup: 346
# of original triplets: 543
# of triplets for current setup: 543
Map: {'<START>': 0, 'O': 1, 's': 2, 'b': 3, 'e': 4, 'i': 5, '<STOP>': 6}
vocab2id: 2861
vocab size: 2861
reading the pretraing embedding: data/glove.840B.300d.txt
[Info] Use the pretrained word embedding to initialize: 2861 x 300
['<START>', 'O', 's', 'b', 'e', 'i', '<STOP>']
Capacity successfully set to: [83 10 3 2 3 3 3]
The max size: 83
#instances= 487
Touching ...
..........
Toucing Completes taking 81.15600061416626 seconds.
[] tensor(-inf)
['O', '<START>'] tensor(0.5778)
['O', 'O'] tensor(1.5546)
['s', 'O'] tensor(-0.3605)
['O', 's'] tensor(-1.1066)
['<STOP>', 'O'] tensor(-1.2451)
['s', '<START>'] tensor(0.3075)
['b', '<START>'] tensor(2.9103)
['i', '<START>'] tensor(-1.8127)
['O', 'b'] tensor(-0.1694)
['O', 'e'] tensor(-0.6851)
['s', 's'] tensor(-0.1793)
['s', 'e'] tensor(0.5894)
['b', 'O'] tensor(0.6963)
['b', 's'] tensor(-0.8922)
['b', 'e'] tensor(0.0064)
['e', 'b'] tensor(-0.8084)
['e', 'i'] tensor(-0.1822)
['i', 'b'] tensor(-0.5260)
['i', 'i'] tensor(-1.2019)
['<STOP>', 's'] tensor(1.4376)
['<STOP>', 'e'] tensor(1.5863)
['e', 'O'] tensor(0.5885)
Start Training...
Traceback (most recent call last):
File "jet_o.py", line 138, in <module>
model.learn(train_insts, num_iter, dev_insts, test_insts, optimizer_str, batch_size)
File "C:\Users\sp\.conda\envs\JET\Position-Aware-Tagging-for-ASTE\triplet\hypergraph\NetworkModel.py", line 257, in learn
label_score = self.forward(gold_network)
File "C:\Users\sp\.conda\envs\JET\Position-Aware-Tagging-for-ASTE\triplet\hypergraph\NetworkModel.py", line 409, in forward
return network.inside()
File "C:\Users\sp\.conda\envs\JET\Position-Aware-Tagging-for-ASTE\triplet\hypergraph\TensorNetwork.py", line 59, in inside
for_expr = torch.sum(torch.take(self.inside_scores, childrens_stage), 2) # this line is same as the above two lines
RuntimeError: Expected object of scalar type Long but got scalar type Int for argument #2 'index' in call to _th_take
I am trying to run the code on the data obtained by combining 14res, 15res, and 16res datasets into one single restaurant dataset. However, on this combined data, my 12 GB RAM gets fully occupied and the code stops execution. Can you provide the result over combined data as I need It for analyzing models?
作者您好,公布的代码是没有ASTE-DATA-V2到data/triplet_data的数据处理过程吗?想问一下,这一部分是如何做的呢?
While trying to run the training code with bert, the glove embedding is being loaded into the ram. This in my case is occupying whole 16GB and the code stops working. Is this supposed to happen? Is there a way to optimize this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.