word-tally
Output a tally of the number of times unique words appear in source input.
Usage
Usage: word-tally [OPTIONS] [PATH]
Arguments:
[PATH] File path to use as input rather than stdin ("-") [default: -]
Options:
-s, --sort <ORDER> Sort order [default: desc] [possible values: desc, asc, unsorted]
-c, --case <FORMAT> Case normalization [default: lower] [possible values: original, upper, lower]
-m, --min-chars <COUNT> Exclude words containing fewer than min chars
-M, --min-count <COUNT> Exclude words appearing fewer than min times
-e, --exclude <WORDS> Exclude words from a comma-delimited list
-d, --delimiter <VALUE> Delimiter between keys and values [default: " "]
-o, --output <PATH> Write output to file rather than stdout
-f, --format <FORMAT> Output format [default: text] [possible values: text, json, csv]
-v, --verbose Print verbose details
-h, --help Print help
-V, --version Print version
Examples
|
#>> tally 22
#>> word 20
#>> https 11
CSV output:
# Using delimiter (manual CSV)
# Using CSV format (with header)
JSON output:
Installation
Cargo.toml
Add word-tally as a dependency.
[]
= "0.17.0"
Documentation
Tests & benchmarks
Clone the repository.
Run the tests.
And run the benchmarks.