Git Product home page Git Product logo

sentiment's People

Contributors

cdipaolo avatar ev0l avatar torie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentiment's Issues

How to get the polarity score with this library?

Just like python textblob library (but it's too slow and hard to embedded in go), using [-1, 1] float number to describe sentiment, -0.x means bad, +0.x means good, -1 means worst, 1 means best.

Thanks a lot!

How to add more dataset?

Assuming that I have a new dataset in English, what are the steps to expand the knowledge of this library?

Language implimentation

Hi,
I am trying to implement Russian language.

I've created train data in Russian and trained the model using .Train() (init.go) function previously added TrainRussianModel() line inside of it. Then I used go-bindata to generate a file and replaced bindata.go with it.
bindata.zip this is my version of the compiled model containing Russian language.

The problem is when I am trying to restore the model I am getting this error

panic: json: cannot unmarshal object into Go struct field NaiveBayes.tokenizer of type text.Tokenizer

in this code

models, err := sentiment.Restore()
if err != nil {
   panic(err)
}
result := models.SentimentAnalysis("Это отличный фильм!", sentiment.Russian)
mt.Println(result)

The model works if I train it and use it right away after training without trying to save it on the disk.

Support other languages

Could you provide example how to train the library for sentiment analysis in other languages?

Train on new model

Hello!
I have read the closed issue about Spanish language, and I think I go idea how to retrain the model, but I am a little not sure

  • I should create my dataset/train folder with pos/neg and place the data there -- that clear
  • Then I create my_en.go file which walks that dataset I just created

And then I am not sure what I should do to make it Train, and save trained data and use it for analyzes?

Add A License

If possible please add a license, otherwise you are not legally allowed to use this code in other libraries

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.