Expand description
§Tagalyzer
Tagalyzer is a text-analysis library intended to aid writers in finding appropriate tags for their content. As of now, it counts words in a list of files, performing certain character-based filtering in an attempt to remove formatting characters and punctuation.
§Examples
To see a basic example without installing the CLI tool, try running one of these:
cargo run -- README.mdcargo run -- --help§Library Usage
There are two main ways to use this library. The simpler one is to use the FileProcessor
struct:
use tagalyzer::prelude::*;
let fp = FileProcessor::default();
let word_counts = fp.count_words_in_file("README.md").unwrap();
assert!(word_counts.get("words").unwrap() > &0)Alternatively, you can instantiate a Tagalyzer from an instance of Args by supplying a faux
CLI input with as many files as you want.
use tagalyzer::prelude::*;
let mut tag = Tagalyzer::new(&["LICENSE-APACHE", "LICENSE-MIT"], FileProcessor::default());
let _ = tag.count_all_files().unwrap();
let tag = tag.sort();
print!("{tag}");Modules§
Structs§
- Args
- File
Processor - File Processor
- File
Statistics - File Statistics
- Sorted
- Sorted State Marker
- Tagalyzer
- Tagalyzer
- Unsorted
- Unsorted State Marker
Traits§
- Parser
- Parse command-line arguments into
Self.
Derive Macros§
- Parser
- Generates the
Parserimplementation.