Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sent_len, sent_num #8

Open
savvyyy opened this issue Apr 22, 2020 · 5 comments
Open

sent_len, sent_num #8

savvyyy opened this issue Apr 22, 2020 · 5 comments

Comments

@savvyyy
Copy link

savvyyy commented Apr 22, 2020

Hi @yafangy Great work. Thanks for sharing the code.
I was preparing datasets for laptop. I need to know how did you decide sent_len and sent_num in case of restaurant?
sent_len, sent_num = 83, 2000
and
sent_len, sent_num = 83, 676

While using the same values for laptop datasets, I got an error telling:-
IndexError: index 1900 is out of bounds for axis 0 with size 2000

Please guide me through this.

@yafangy
Copy link
Owner

yafangy commented Apr 23, 2020

I believe it is related to the dataset. The sent_len is the maximum words in each sentence, and sent_num is the number of sentences to be processed. For different dataset, the number of training sentences might be different. Maybe try to use a smaller sent_num if it exceeds the number of sentences in the dataset.

@savvyyy
Copy link
Author

savvyyy commented Apr 24, 2020

Hi @yafangy
Thanks for the help. It worked for my datasets.
I have one more query.
What changes I should make in order to get polarity of the aspects as mentioned in in this image
How did you came across getting the category and polarity.
Please guide.

@savvyyy
Copy link
Author

savvyyy commented Apr 27, 2020

Hi @yafangy Kindly help me with issue above. I am eagerly waiting to know the process.

@savvyyy
Copy link
Author

savvyyy commented May 26, 2020

Hello sir @yafangy
I have been waiting long for your reply. Kindly reply or give me any other input for my question. It will be really helpful sir. Please guide.

@yafangy
Copy link
Owner

yafangy commented May 26, 2020

This code is for aspect extraction and the result is shown in https://github.com/yafangy/Review_aspect_extraction/blob/master/image3_v2.png.

This polarity you found is in the training dataset but not in the scope of this current code. You can either add another sentiment analysis for the target word or the following. For the current approach I posted, you can try to simply increase the output from 0/1 (normal word vs. aspect word), to a 4-class multi-category (normal word, positive/neutral/negative aspect word) and add the polarity into consideration when you generate labels. Let me know if it works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants