By ctoshpokh
Every example I have seen on the internet about sentiment analysis uses a pre-existing sample file imported from nltk.corpus but I already have multiple .db files for training. How would I use those and not import from nltk.corpus? Anyone?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
To perform sentiment analysis with your own .db files, you would need to replace the data loaded from the nltk.corpus with your own data.
Typically, this involves three steps:
Load the data from your .db files.
Preprocess your data to the same structure as that which is expected by the sentiment analysis model.
Feed the preprocessed data into the model in lieu of the nltk.corpus data.
While the specifics can vary based on your .db file structure and the sentiment analysis model you are using, this general process should guide you in the right direction.
Please refer to DigitalOcean Tutorials for in-depth guides on Python and Data Science topics.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.