alexyangli / absa_keras Goto Github PK
View Code? Open in Web Editor NEWKeras Implementation of Aspect based Sentiment Analysis
Keras Implementation of Aspect based Sentiment Analysis
Thank you for sharing this wonderful tutorial. I downloaded the glove.42B.300d file and run the preprocess.py code,but occurd an error: ValueError: invalid literal for int() with base 10: ',' have you ever come across this error? how can i slove it ?I am looking forward for your reply. Thank you .
run preprocess.sh to generate word_glove.npy
Originally posted by @AlexYangLi in #3 (comment)
Running the preprocess.sh file does not generate word_glove.npy
Could you please upload that file?
1. why use SpatialDropout1D not dropout ?
2. why right part use go_backwords=True not pad_sequence(padding='post', truncating='post')
3. why left part ended with $t$+(aspect words length) and right part start from left of $t$?
4. ATAE paper mentioned 'tanh(Wx Hn+Wp r)' in your code using Activation('tanh')(Add()([v1, v2])), this need think?
Dear author(s)
What great work! I was cloning your codes, and it was running very well. I plan to run these codes using my own datasets according to my research. However, I have some questions:
Thank you in advance.
regards,
Novi
Hi,
I ran train.py of the previous commit, but only 'cabasc' got an error as follows:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Matrix size-incompatible: In[0]: [2336,300], In[1]: [1324,1324] [[{{node model_1/content_attention_1/MatMul_1}}]] [[{{node metrics/acc/Mean}}]]
At that time, the code toggle comments on most of train_model(...) and just ran fixed word/aspect embedding part, i.e.
config.word_embed_trainable = False
config.aspect_embed_trainable = False
train_model('laptop/term', 'laptop', 'word', 'td_lstm')
train_model('laptop/term', 'laptop', 'word', 'tc_lstm')
train_model('laptop/term', 'laptop', 'word', 'ae_lstm')
train_model('laptop/term', 'laptop', 'word', 'at_lstm')
train_model('laptop/term', 'laptop', 'word', 'atae_lstm')
train_model('laptop/term', 'laptop', 'word', 'memnet')
train_model('laptop/term', 'laptop', 'word', 'ram')
train_model('laptop/term', 'laptop', 'word', 'ian')
# train_model('laptop/term', 'laptop', 'word', 'cabasc')
Only 'cabasc' was toggled comment and did not plot on the results of combining ELMo Embedding as well.
So I guess that 'cabasc' can not run in this condition?
When I am trying to run train.py It is showing me the error
File "train.py", line 183, in <module>
train_model('twitter', 'twitter', 'word', 'atae_lstm')
File "train.py", line 46, in train_model
model = SentimentModel(config)
File "C:\Users\papa\Documents\ABSA_Keras\models.py", line 75, in __init__
self.config.word_embed_type))
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 415, in load
fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: './data/twitter/word_glove.npy'
results in the [] are the performances of models with noth word embeddings and aspect embeddings fixed
您好,我用您的代码跑了这几个数据集,发现实现结果跟Paper上的低了1%或者2%。请问是什么问题?感谢回复
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.