| Crates.io | sakurs-cli |
| lib.rs | sakurs-cli |
| version | 0.1.1 |
| created_at | 2025-07-27 14:02:11.556415+00 |
| updated_at | 2025-07-27 15:29:50.751091+00 |
| description | Command-line interface for Sakurs sentence boundary detection |
| homepage | https://github.com/sog4be/sakurs |
| repository | https://github.com/sog4be/sakurs |
| max_upload_size | |
| id | 1770106 |
| size | 89,338 |
Fast, parallel sentence boundary detection for the command line.
cargo install sakurs-cli
After installation, the sakurs command will be available in your PATH.
# Process text files
sakurs process -i document.txt
# Process multiple files with glob pattern
sakurs process -i "*.txt"
# Process from stdin
echo "Hello world. How are you?" | sakurs process -i -
# Output as JSON
sakurs process -i document.txt -f json
# Process a single file
sakurs process -i report.txt
# Process with specific language
sakurs process -i japanese_text.txt -l japanese
# Process all text files in a directory
sakurs process -i "documents/*.txt"
# Recursive processing with complex patterns
sakurs process -i "**/*.{txt,md}"
# Default format (human-readable)
sakurs process -i file.txt
# JSON format for programmatic use
sakurs process -i file.txt -f json
# Quiet mode (only sentence count)
sakurs process -i file.txt -f quiet
For large files, you can tune performance:
# Use 8 threads with 1MB chunks
sakurs process -i large_file.txt --threads 8 --chunk-kb 1024
# Sequential processing (useful for debugging)
sakurs process -i file.txt --sequential
sakurs process [OPTIONS]
OPTIONS:
-i, --input <INPUT> Input file(s) or '-' for stdin
-o, --output <OUTPUT> Output file (default: stdout)
-f, --format <FORMAT> Output format [default: text]
[possible values: text, json, quiet]
-l, --language <LANGUAGE> Language for sentence detection [default: en]
[possible values: en, ja, english, japanese]
--sequential Force sequential processing
--parallel Force parallel processing (default: auto)
--threads <N> Number of threads (default: CPU count)
--chunk-kb <SIZE> Chunk size in KB [default: 256]
-h, --help Print help
-V, --version Print version
sakurs process -i japanese_novel.txt -l ja -f json > sentences.json
# Extract sentences from all README files
sakurs process -i "**/README.md" -f quiet
# Count sentences in git commit messages
git log --format=%B | sakurs process -i - -f quiet
# Extract sentences from specific files
find . -name "*.txt" -exec sakurs process -i {} \;
MIT License. See LICENSE for details.