Guidelines for safely deleting dictionary entries while properly updating indexes and cross-references.
Use this skill when you need to remove an entry from the dictionary. This ensures all indexes and cross-references are properly updated.
Valid reasons for deletion:
resolve-duplicates skill)Do NOT delete entries just because they need improvement - use revise-entries skill instead.
Before deleting any entry:
00123_taberu)ใในใ){้ฃในใ|ใในใ})entries/00000/00123_taberu.json)Search for other entries that reference the entry you're deleting:
# Search by reading
grep -r '"reading": "ใในใ"' entries/ --include="*.json" -l
# Search by headword text (without furigana)
grep -r '้ฃในใ' entries/ --include="*.json" -l
# Search in cross_references arrays specifically
grep -r '"cross_references"' entries/ -A 20 | grep -B 5 '"reading": "ใในใ"'
For each entry that references the one being deleted:
If the reference is no longer relevant:
// Before
"cross_references": [
{"type": "related", "reading": "ใในใ", "headword": "{้ฃในใ|ใในใ}", "label": "to eat"}
]
// After (remove the reference)
"cross_references": []
If a better entry exists (e.g., after merging duplicates):
// Update the reading/headword/label to match the kept entry
"cross_references": [
{"type": "related", "reading": "ใในใ", "headword": "{้ฃในใ|ใในใ}", "label": "to eat"}
]
If the cross-reference is still useful even without a target entry, you may keep it. The reference will simply not link to anything.
# Remove the entry file
rm entries/{range}/{entry_id}.json
# Example:
rm entries/04500/04567_taberu.json
Verify deletion:
ls entries/04500/04567_taberu.json # Should return "No such file"
Run the index update script:
python3 build/update_indexes.py
This script automatically:
entries_index.jsoncandidate_words.jsonIf the word should eventually have an entry (just not this flawed one):
update_indexes.py already re-added it to candidatescandidate_words.json:{
"reading": "ใในใ",
"headword": "้ฃในใ",
"english": "to eat",
"notes": "Previous entry deleted due to [reason]. Needs new entry."
}
make index # indexes + kanji JSON; the site builds in CI after merge
This updates the website data. Without this step, the deleted entry may still appear on the live site.
python3 build/validate.py
Confirm:
# 1. Note the entry to delete
# ID: 04567_taberu, Reading: ใในใ, Path: entries/04500/04567_taberu.json
# 2. Find cross-references
grep -r '"reading": "ใในใ"' entries/ --include="*.json" -l
# 3. Update any cross-references found (edit those files)
# 4. Delete the entry
rm entries/04500/04567_taberu.json
# 5. Update indexes
python3 build/update_indexes.py
# 6. Rebuild flat file
make index # indexes + kanji JSON; the site builds in CI after merge
# 7. Validate
python3 build/validate.py
# 8. Commit changes
git add entries/ docs/ *.json PROJECT_STATUS.md
git commit -m "Remove duplicate/erroneous entry: 04567_taberu"
git push
When updating cross-references, use this format:
{
"type": "related", // or: pair, antonym, keigo, synonym, contrast, see_also
"reading": "ใใ", // hiragana reading
"headword": "{่ชญใ|ใใ}", // with furigana (for disambiguation)
"label": "to read" // optional human-readable label
}
Cross-reference types:
pair - Transitive/intransitive verb pairsantonym - Opposite meaningskeigo - Honorific/humble equivalentssynonym - Similar meaningscontrast - Often confused wordsrelated - Semantically relatedsee_also - General referencemake index?docs/flat_dictionary.jsonupdate_indexes.py againAlways back up first if deleting multiple entries:
git stash # or commit current state first
Delete one at a time when learning - run validation after each
Never delete without checking cross-references - broken links degrade dictionary quality
Document deletions in commit messages for future reference