Installation
Command-Line Tool
Homebrew (macOS/Linux)
brew tap joshrotenberg/brew
brew install unimorph
Cargo (from crates.io)
If you have Rust installed:
cargo install unimorph
Docker
Pull the image from GitHub Container Registry:
docker pull ghcr.io/joshrotenberg/unimorph-rs:latest
Run with a persistent data cache:
# Download a dataset
docker run -v ~/.cache/unimorph:/data ghcr.io/joshrotenberg/unimorph-rs download spa
# Query the data
docker run -v ~/.cache/unimorph:/data ghcr.io/joshrotenberg/unimorph-rs inflect spa hablar
# Export data
docker run -v ~/.cache/unimorph:/data -v $(pwd):/output ghcr.io/joshrotenberg/unimorph-rs \
export spa -f jsonl -o /output/spanish.jsonl
You can also create a shell alias for convenience:
alias unimorph='docker run -v ~/.cache/unimorph:/data ghcr.io/joshrotenberg/unimorph-rs'
From Source
git clone https://github.com/joshrotenberg/unimorph-rs
cd unimorph-rs
cargo install --path crates/unimorph-cli # directory still named unimorph-cli
Rust Library
Add to your Cargo.toml:
[dependencies]
unimorph-core = "0.1"
Or with cargo:
cargo add unimorph-core
Shell Completions
Generate completions for your shell:
# Bash
unimorph completions bash > ~/.local/share/bash-completion/completions/unimorph
# Zsh
unimorph completions zsh > ~/.zfunc/_unimorph
# Fish
unimorph completions fish > ~/.config/fish/completions/unimorph.fish
# PowerShell
unimorph completions powershell > _unimorph.ps1
For Zsh, ensure ~/.zfunc is in your fpath:
# Add to ~/.zshrc before compinit
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit
Verifying Installation
unimorph --version
unimorph --help
Data Storage
By default, unimorph stores data in:
- Linux/macOS:
~/.cache/unimorph/ - Custom: Set
UNIMORPH_DATAenvironment variable or use--data-dir
Configuration is stored in:
- All platforms:
~/.config/unimorph/config.toml