Coder Social home page Coder Social logo

jalchr / dragon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from i2infinity/dragon

1.0 3.0 0.0 24.59 MB

C# implementation for Naive Bayes sentiment classification engine (evidence files included)

Home Page: http://solvy.cloudapp.net/

License: MIT License

C# 94.88% Java 5.12%

dragon's Introduction

Dragon Sentiment Classifier

Dragon Sentiment Classifier is primarily used in the Product Review Search App - Solvy http://solvy.cloudapp.net/

Description

Dragon Sentiment API is a C# implementation of the Naive Bayes Sentiment Classifier to analyze the sentiment of a text corpus. Sentiment analysis calculates the attitude or opinion towards something, such as a product, location, organization or person. This API provides easy to use mechanism to identify the positive or negative sentiment of an input document. Please note that this API works best on a large corpus of words (e.g. product reviews or blogs with 1000+ words) and targeted towards electronic/gadget reviews.

Training the Dragon

Dragon API is a machine learning algorithm that first needs to be taught how to classify a random collection of words and this training is performed using a couple of included evidence files (Postive.Evidence.csv and Negative.Evidence.csv) that contain the frequency map for words that commonly occur in electronic gadget reviews.

Getting Started

In order to classify plain text contents:

//positiveReviews and negativeReviews are the training set used by our Dragon Classigfier
var positiveReviews = new Evidence("Positive", "Repository\\Positive.Evidence.csv");
var negativeReviews = new Evidence("Negative", "Repository\\Negative.Evidence.csv");

//Instantiate the classifier using the training data set
var classifier = new Classifier(positiveReviews, negativeReviews);

//testData โ€“ String variable that contains the readable plain text contents of the document that needs to be classified (Strictly no HTML)
//The second parameter is the list of words that are excluded to improve classification performance
var scores = classifier.Classify(testData, DragonHelper.DragonHelper.ExcludeList);
Console.WriteLine("Positive Score - " + scores["Positive"]);

dragon's People

Contributors

i2infinity avatar

Stargazers

Nicholas Ventimiglia avatar

Watchers

Nicholas Ventimiglia avatar Jalal EL-SHAER avatar James Cloos avatar

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.