Comments (1)
I didn't got deep in the code, but I solved it like this:
import natural from 'natural';
const analyzer = new natural.SentimentAnalyzer("English", natural.PorterStemmer, "afinn");
console.log(analyzer.getSentiment(["I", "like", "cherries"]));
from natural.
Related Issues (20)
- Unneeded `tsc` dependency HOT 4
- SentenceTokenizer works badly with numbered lists HOT 1
- Build errors trying to use natural with create react app (CRA) react v 18.2.0, natural v6.2.0 HOT 2
- Save data in Mongodb HOT 10
- Bayes Classifier Restore Issue
- Release updated type declarations HOT 1
- Trying to import natural in TypeScript yields a linter error
- Missing typings for LevenshteinDistanceSearch as well as for DamerauLevenshteinDistanceSearch HOT 2
- Sanity check - client side only possible? HOT 2
- Version 6.5.0 introduces a breaking change for sentence tokenizing HOT 2
- Error when using natural from deno using esm.sh HOT 1
- Enhancement: Stricter Typing for tag Field in BrillPOSTaggedWord Interface HOT 1
- Error in `natural.JaroWinklerDistance()` when missing optional `options` parameter
- natural.AggressiveTokenizerRu() doesn't filter out non-cyrillic characters HOT 1
- Bulk mode that is mindful of event loop HOT 2
- Check for Eszett symbol ß in German tokenizer HOT 1
- Noob Question. Challenge to devs? Help?
- Typo in docs HOT 1
- Load model with BayesClassifier and PorterStemmerEs HOT 2
- Cannot read properties of undefined (reading 'on') HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natural.