Skip to content

A CLI tool to perform simple sentiment analysis written in Rust, using a Rust port of VADER.

License

Notifications You must be signed in to change notification settings

Yukigeshiki/sentiment-analysis-cli-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sentiment-analysis-cli-rust

build

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.

How to run:

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 --release

To run for a text file:

./target/release/sentiment analyse text -p path/to/file/foo.txt

To 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 help

or

./target/release/sentiment analyse help

About

A CLI tool to perform simple sentiment analysis written in Rust, using a Rust port of VADER.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages