1---
2name: toki-pona-dictionary
3description: Searches nimi.li for toki pona words by English meaning. Use when the user asks for toki pona translations, wants to look up toki pona words, mentions nimi.li, or needs to find how to say something in toki pona. Also triggers on "toki pona dictionary", "toki pona translation", or "how to say X in toki pona".
4compatibility: Requires Python 3 and internet access
5---
6
7# Searching nimi.li for toki pona words
8
9Searches the nimi.li toki pona dictionary by English meaning. Fetches all word data once (caches to cwd), then searches definitions and community usage tags without hitting the network again.
10
11## Step 1: Fetch data (once per project/session)
12
13```bash
14python3 SCRIPTS_DIR/search-nimi.li.py fetch
15```
16
17Creates `nimi-data-raw.json` and `nimi-words.json` in cwd. Re-run only if data seems stale or the user asks about a recently coined word.
18
19## Step 2: Search
20
21```bash
22python3 SCRIPTS_DIR/search-nimi.li.py friend
23python3 SCRIPTS_DIR/search-nimi.li.py water food
24```
25
26Each argument is a separate search. This is deliberate: toki pona compounds words (e.g. "friend" = `jan pona`, "watercraft" = `tomo tawa`), so searching each concept independently is more useful than searching exact phrases.
27
28## What you get
29
30Each result includes the toki pona word and its English definition. The `ku_data` field maps English synonyms to community usage scores — useful for finding words that aren't in the main definition but are commonly associated.