A CLI tool to perform simple sentiment analysis written in Rust, using a Rust port of VADER.
Analysis can be performed on a text file or text within an HTML file. For HTML, you can supply a path to a file locally, or you can scrape HTML from the web. Currently, a CSS selector is used to specify the HTML element which contains the required text, but I hope to add xpath functionality in the future too.
First make sure you have Rust installed. To do this you can follow the instructions found here.
Clone the repo, cd into it and run:
cargo build --releaseTo run for a text file:
./target/release/sentiment analyse text -p path/to/file/foo.txtTo run for an HTML file:
./target/release/sentiment analyse html -p path/to/file/foo.html -s "div > div > p"To scrape and run for a webpage:
./target/release/sentiment analyse html -p https://page-to-scrape.com -s "div > div > p"For more info about the CLI tool, run:
./target/release/sentiment helpor
./target/release/sentiment analyse help