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

Multi-class Sentiment Analysis: How to use custom dataset? #96

Closed
LinuxBeginner opened this issue Jan 31, 2021 · 0 comments
Closed

Multi-class Sentiment Analysis: How to use custom dataset? #96

LinuxBeginner opened this issue Jan 31, 2021 · 0 comments

Comments

@LinuxBeginner
Copy link

Hi, Thank you very much for sharing this tutorial.

In the tutorial, the dataset used is from IMDB.

However, in my case, I have three text files with class A, B and C separately.

How should I edit the code to run it for my dataset.

I have gone through this tutorial (Using TorchText with Your Own Datasets) too, still I am not able to relate it.

Right now I have created one json file by combining the three files and shuffle it, below is the format for first 3 lines from the file:


{'text': ['Line1word1','Line1word2','Line1word3','Line1word4']'label': 'A'}
{'text': ['Line2word1','Line2word2','Line2word3']'label': 'B'}
{'text': ['Line3word1','Line3word2','Line3word3','Line3word4']'label': 'A'}

How do I input the above file?

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