WFGY/ProblemMap/GlobalFixMap/Language/stopword_and_morphology_controls.md

12 KiB
Raw Blame History

Stopword and Morphology Controls · Global Fix Map

🧭 Quick Return to Map

You are in a sub-page of Language.
To reorient, go back here:

Think of this page as a desk within a ward.
If you need the full triage and all prescriptions, return to the Emergency Room lobby.

Lock language specific stopwords and morphology so retrieval remains stable across scripts and locales. Protect entities from stopword removal, version your lemmatizer, and verify with ΔS, λ, and coverage targets.


Open these first


Core acceptance targets

  • ΔS(question, retrieved) ≤ 0.45 on three paraphrases and two seeds
  • Coverage of target section ≥ 0.70
  • λ convergent when switching between inflected forms and lemmas
  • Removing stopwords never drops a required entity or negation token
  • Rank@k does not regress more than 2 points after morphology changes

What usually breaks

Symptom Likely cause Open this
Named entities vanish after preprocessing stopword list removes particles that are part of names proper_noun_aliases.md
Wrong meaning for negated statements stopword filter removes “not” class tokens retrieval-traceability.md
Duplicate docs across lemma and surface form inconsistent stemming across index and query tokenizer_mismatch.md
CJK recall collapses after adding stopwords imported Latin stopword list applied to CJK script_mixing.md
Turkish i and ı behave inconsistently locale fold differs across stages locale_drift.md
Romanized queries fail while native works alias view absent and morphology applied only to native romanization_transliteration.md

Language family controls

Latin and Germanic

  • Case fold with locale aware rules.
  • Use light stemming or lemmatization, not both.
  • Keep negation terms out of stopwords. Maintain a protected list.

Romance

  • Normalize accents consistently.
  • Prefer lemmatization for verbs and nouns.
  • Maintain a protected list for names with articles or particles.

CJK

  • Do not apply generic stopword lists.
  • Use bigram or language specific tokenizers.
  • Keep entities in dedicated fields without stopword removal.

Semitic RTL

  • Normalize diacritics and width consistently.
  • Use lemmatization that preserves roots only if evaluation passes ΔS and coverage.
  • Keep a protected list for clitics that change meaning.

Indic

  • Avoid generic lists from other languages.
  • Use language specific analyzers and verify with bilingual eval.
  • Protect named entities that share forms with common words.

Cyrillic and Greek

  • Apply accent and width normalization.
  • Prefer lemmatization over aggressive stemming.
  • Maintain a protected entity list for inflected forms.

Deterministic pipeline checklist

  1. Version every component: stoplist_v, stemmer_v, lemma_v, normalize_v.
  2. Define no stop zones for entity fields and citation fields.
  3. Keep words filter with a protected list per language code.
  4. Apply normalization before morphology, not after.
  5. Use the same pipeline for indexing and querying.
  6. Log a morphology fingerprint in traces and eval reports.

Copy snippets

A. Protected term filter sketch

{
  "analysis": {
    "filter": {
      "keep_entities_en": {
        "type": "keep",
        "keep_words": ["New York", "AT&T", "Côte d'Ivoire", "Íñigo", "İstanbul"]
      }
    }
  }
}

B. Minimal morphology config record

{
  "language": "tr",
  "stoplist_v": "tr_core_1.2",
  "lemma_v": "tr_lemma_0.9",
  "normalize_v": "nfkc_fold_tr",
  "no_stop_fields": ["title_exact", "entity_exact"],
  "protected_list_hash": "sha256:..."
}

C. Trace fields to log

{
  "ΔS": 0.42,
  "λ_state": "<>",
  "coverage": 0.74,
  "language": "ar",
  "morph_fingerprint": "stop:ar_1.1|lemma:ar_0.8|norm:nfkc_1.0|keep:hash"
}

Eval protocol

  • Use bilingual and code switching sets from code_switching_eval.md.
  • For each query, test with and without stopword removal and with two morphology settings.
  • Accept only if ΔS ≤ 0.45, coverage ≥ 0.70, λ convergent, and no loss of entity recall.
  • Report Rank@k deltas for lemma vs surface forms.

When to escalate


Copy paste prompt for the LLM step

You have TXTOS and the WFGY Problem Map loaded.

Task:
1) For {lang, script}, choose stopword and morphology settings that protect entities and negation.
2) Run cite then explain. If ΔS(question, retrieved) ≥ 0.60, propose the minimal structural fix.
3) Return JSON:
{ "stoplist_v": "...", "lemma_or_stem": "lemma|stem|none", "protected_terms": [...], "ΔS": 0.xx, "coverage": 0.xx, "λ_state": "→|←|<>|×" }
Keep it auditable and short.

🔗 Quick-Start Downloads (60 sec)

Tool Link 3-Step Setup
WFGY 1.0 PDF Engine Paper 1 Download · 2 Upload to your LLM · 3 Ask “Answer using WFGY + <your question>”
TXT OS (plain-text OS) TXTOS.txt 1 Download · 2 Paste into any LLM chat · 3 Type “hello world” — OS boots instantly

Explore More

Layer Page What its for
Proof WFGY Recognition Map External citations, integrations, and ecosystem proof
Engine WFGY 1.0 Original PDF based tension engine
Engine WFGY 2.0 Production tension kernel and math engine for RAG and agents
Engine WFGY 3.0 TXT based Singularity tension engine, 131 S class set
Map Problem Map 1.0 Flagship 16 problem RAG failure checklist and fix map
Map Problem Map 2.0 RAG focused recovery pipeline
Map Problem Map 3.0 Global Debug Card, image as a debug protocol layer
Map Semantic Clinic Symptom to family to exact fix
Map Grandmas Clinic Plain language stories mapped to Problem Map 1.0
Onboarding Starter Village Guided tour for newcomers
App TXT OS TXT semantic OS, fast boot
App Blah Blah Blah Abstract and paradox Q and A built on TXT OS
App Blur Blur Blur Text to image with semantic control
App Blow Blow Blow Reasoning game engine and memory demo

If this repository helped, starring it improves discovery so more builders can find the docs and tools. GitHub Repo stars