Skip to content

NA2047/SentimentCoreMLDemo

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Sentiment Polarity CoreML Demo

A Demo application using CoreML framework for sentiment polarity analysis.

SentimentCoreMLDemo

Model

CoreML model was converted from Scikit-learn Pipeline using coremltools python package.

The model is based on LinearSVC classifier and is able to distinguish between positive and negative sentences with best CV score = 0.801013024602. It was trained using Epinions.com dataset with reviews of products and services. Accuracy can be improved by using TfidfVectorizer for feature extraction, but it's not supported by coremltools at the moment.

Requirements

  • Xcode 9
  • iOS 11

Installation

git clone https://github.com/cocoa-ai/SentimentCoreMLDemo.git
cd SentimentCoreMLDemo
open SentimentPolarity.xcodeproj/

Build the project and run it on a simulator or a device with iOS 11.

Conversion

cd Convert
python sentiment.py

Author

Vadym Markov, [email protected]

Credits

References

About

๐Ÿ˜ƒ iOS11 demo application for sentiment polarity analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 64.2%
  • Python 35.8%