14.9 aztext sentiment

THIS SECTION IS UNDER DEVELOPMENT. PLEASE COME BACK LATER

The sentiment command determines how positive the text is on a scale from 0 (negative) through 0.5 (neutral) to 1 (positive).

$ ml sentiment aztext The weather here is cold and dreary
0.17

$ ml sentiment aztext had a great trip and all went really well
0.97

Pipeline: Extract Just Positive Utterances From File

$ cat sample.txt | 
  ml sentiment aztext | 
  awk '$1>0.5{print NR}' | 
  xargs -I % sed -n %p sample.txt

Pour le logiciel libre, la liberté a un prix et un modèle économique
I just toured Ecuador and Peru and came back addicted to plantains.


Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.