ots is an interface to libots - The Open Text Summarizer.
- libxml2
- glib2.0
sudo apt-get install pkg-config libxml2-dev libglib2.0-dev
go get github.com/shanna/ots
brew install pkg-config glib
go get github.com/shanna/ots
If ots complains about missing libxml2 headers you may need to grab the xcode developer tools
again. Trigger an install with xcode-select --install
.
import 'github.com/shanna/ots'
article := ots.Parse("I think I need some ice cream to cool me off. It is too hot down under", "en")
article = ots.Parse("j'ai besoin de la crème glacée. il fait trop chaud en australie.", "fr")
article.Keywords()
article.Percent(50)
article.Sentences(1)
ots.Languages() #=> list of supported language dictionaries baked-in to libots
MIT