leaveret/nis-rs

A fast, scriptable, and interactive terminal client for the Turkish etymological dictionary, nisanyansozluk.com, written in Rust.

★ 1Forks 0RustGitHub ↗Compare
clidictionaryetymologymermaidrustscraperterminaltuiturkish

README

nis-rs

A terminal client for nisanyansozluk.com written in Rust.

License: MIT Rust


Features

  • Word Lookup: Find definitions, etymologies, historical records, and related words.
  • Interactive Navigation (-i): Use arrow keys to browse through similar words and suggestions.
  • Etymology Graphs (-g): View roots, derivations, and compounds as ASCII trees or export them to Mermaid.js.
  • Search & Filters: Filter by wildcard, definition, Arabic/Semitic root, date range, affix, or language.
  • Batch Processing: Process inputs from a file (-f) or via standard input pipes.
  • Data Export: Save results to JSON, YAML, CSV, or Markdown.
  • Script-Friendly (-p): Output plain text without boxes or ANSI colors.

Installation

git clone https://github.com/leaveret/nis-rs.git
cd nis-rs
cargo build --release

The compiled binary will be at target/release/nis-rs.


Quick Start

Basic Lookup

nis-rs yer

Interactive Navigation

Navigate related words with arrow keys:

nis-rs -i yer

Etymology Graph

Display root and derivation connections in the terminal:

nis-rs -g yer

Or export as a Mermaid diagram:

nis-rs -g yer --markdown

Search & Suggestions

# Autocomplete / suggestions
nis-rs --suggest yer

# Wildcard search
nis-rs --search-word "çeş*"

# Search within definitions
nis-rs --search-def "kimya"

# Reverse search (matches definition & origin)
nis-rs --search-reverse "uranus"

# Historical date range (max 100 years)
nis-rs --search-date 1920-1940

# Filter by language
nis-rs --search-word "bal*" --search-lang "İtalyanca"

Listing Filter Options

View cached languages, grammatical cases, affixes, or forms:

nis-rs --list all
nis-rs --list languages
nis-rs --list affixes

Batch & Stdin Pipelines

# From file
nis-rs -f words.txt

# Via stdin pipe
cat words.txt | nis-rs

Export Formats

nis-rs yer --json
nis-rs yer --yaml
nis-rs yer --csv
nis-rs yer --markdown

Options

Option Short Description
<WORD> — Word to search
--interactive -i Navigate related words with interactive menus
--graph -g Display etymology network graph
--tree -t Show lineage tree only
--plain -p Output unstyled text (no colors or boxes)
--random -r Look up a random word
--file <PATH> -f Read words from a file (one per line)
--pager — Pipe output to terminal pager
--suggest <WORD> — Get suggestions / completions
--list <CATEGORY> — List cached filters (all, languages, cases, affixes, forms)
--search-reverse — Search definition and origin simultaneously
--search-word — Search word with wildcard (*)
--search-def — Search within definitions
--search-root — Filter by Semitic / Arabic root
--search-lang — Filter by language
--search-date — Filter by first recorded date (YYYY-YYYY)
--search-affix — Look up words by affix (e.g. +Ak)
--search-sem-form — Look up words by Semitic form (e.g. mafˁil)
--home — Show dictionary statistics
--json, --yaml, --csv, --markdown — Export formats

License

MIT

Contributors

leaveret

Issues