soju fill-examples

Purpose: Generate missing (or refresh) noun/verb example sentences. Default mode uses Ollama; --local uses built-in Korean 1A/1B templates (no network).

Reads

data/content/registry/vocabulary.yaml, data/content/registry/examples.yaml, verb forms

Writes

data/content/registry/examples.yaml (unless --dry-run / --clean-only as applicable)

Exit codes

0 success · non-zero on error

                                                                              
 Usage: soju fill-examples [OPTIONS]                                          
                                                                              
 Generate noun and verb example sentences via Ollama.                         
                                                                              
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --model                  <str>                    [default: gemma4:e4b]    │
│ --base-url               <str>                    [default:                │
│                                                   http://localhost:11434]  │
│ --temperature            <float>                  [default: 0.4]           │
│ --verb-batch-size        <int>                    Verbs per Ollama request │
│                                                   [default: 4]             │
│ --noun-batch-size        <int>                    Nouns per Ollama request │
│                                                   [default: 6]             │
│ --verbs-only                                                               │
│ --nouns-only                                                               │
│ --clean-only                                      Strip (formal)/(casual)  │
│                                                   notes from example       │
│                                                   English only             │
│ --local                                           Generate examples with   │
│                                                   local Korean 1A/1B       │
│                                                   templates (no Ollama)    │
│ --level                  <str>                    Course level (default:   │
│                                                   SOJU_LANGUAGE_LEVEL or   │
│                                                   1A; see                  │
│                                                   data/content/levels.yam… │
│ --examples               N                        Example sentences per    │
│                                                   verb tense/variant and   │
│                                                   per noun (default: 1)    │
│                                                   [default: 1]             │
│ --max-attempts           N                        Ollama attempts per verb │
│                                                   batch before giving up   │
│                                                   (default: 3)             │
│                                                   [default: 3]             │
│ --mode                   <fill-empty|refresh-all  fill-empty: only entries │
│                          >                        missing examples         │
│                                                   (default); refresh-all:  │
│                                                   regenerate every entry   │
│                                                   [default: fill-empty]    │
│ --verbose                                                                  │
│ --limit                  <int>                    Process only the first N │
│                                                   entries (testing)        │
│ --dry-run                                                                  │
│ --strict                                          Exit non-zero when any   │
│                                                   generation warnings were │
│                                                   produced                 │
│ --help                                            Show this message and    │
│                                                   exit.                    │
╰────────────────────────────────────────────────────────────────────────────╯
uv run soju fill-examples --dry-run
uv run soju fill-examples --local --nouns-only
uv run soju fill-examples --mode fill-empty --limit 10
uv run soju fill-examples --clean-only

Use carefully on large registries; prefer --dry-run / --limit first. Prefer soju import when you already have curated examples.

Course levels: --level selects guidance/templates for the course band. With --local, generation targets tagged entries in that band plus unassigned vocabulary (omit level), so newly imported words still get examples. Higher-level tagged rows stay excluded. Practice retrieval remains stricter (unassigned only with Include supplemental content). Prefer soju import --level or soju levels set so new words join a course band before Practice filtering matters — see soju levels.