diff --git a/3-tidy-up.js b/3-tidy-up.js index 315daeb..8f87a61 100644 --- a/3-tidy-up.js +++ b/3-tidy-up.js @@ -124,7 +124,7 @@ lr.on('line', (line) => { * @param {KaikkiLine} parsedLine */ function handleLine(parsedLine) { - const { pos, sounds, forms } = parsedLine; + const { pos, sounds, forms, etymology_number = 0 } = parsedLine; if(!pos) return; const word = getCanonicalWordForm(parsedLine); if (!word) return; @@ -177,16 +177,16 @@ function handleLine(parsedLine) { if (sensesWithoutInflectionGlosses.length === 0) return; const readings = getReadings(word, parsedLine); - initializeWordResult(word, readings, pos); + initializeWordResult(word, readings, pos, String(etymology_number)); for (const ipaObj of ipa) { - saveIpaResult(word, readings, pos, ipaObj); + saveIpaResult(word, readings, pos, String(etymology_number), ipaObj); } const glossTree = getGlossTree(sensesWithoutInflectionGlosses); for (const reading of readings) { - lemmaDict[word][reading][pos].glossTree = glossTree; + lemmaDict[word][reading][pos][String(etymology_number)].glossTree = glossTree; } } @@ -273,11 +273,12 @@ function processForms(forms, word, pos) { * @param {string} word * @param {string[]} readings * @param {string} pos + * @param {string} etymology_number * @param {IpaInfo} ipaObj */ -function saveIpaResult(word, readings, pos, ipaObj) { +function saveIpaResult(word, readings, pos, etymology_number, ipaObj) { for (const reading of readings) { - const result = lemmaDict[word][reading][pos]; + const result = lemmaDict[word][reading][pos][etymology_number]; const existingIpa = result.ipa.find(obj => obj.ipa === ipaObj.ipa); if (!existingIpa) { result.ipa.push(ipaObj); @@ -291,10 +292,11 @@ function saveIpaResult(word, readings, pos, ipaObj) { * @param {string} word * @param {string[]} readings * @param {string} pos + * @param {string} etymology_number */ -function initializeWordResult(word, readings, pos) { +function initializeWordResult(word, readings, pos, etymology_number) { for (const reading of readings) { - const result = ensureNestedObject(lemmaDict, [word, reading, pos]); + const result = ensureNestedObject(lemmaDict, [word, reading, pos, etymology_number]); result.ipa ??= []; result.glossTree ??= new Map(); } diff --git a/4-make-yomitan.js b/4-make-yomitan.js index 55b6fe9..1bf212b 100644 --- a/4-make-yomitan.js +++ b/4-make-yomitan.js @@ -271,50 +271,52 @@ let lastTermBankIndex = 0; const ipa = []; - for (const [pos, info] of Object.entries(partsOfSpeechOfWord)) { - const foundPos = findPartOfSpeech(pos, partsOfSpeech, skippedPartsOfSpeech); - const {glossTree} = info; - - const lemmaTags = [pos]; - ipa.push(...info.ipa); - - /** @type {Object} */ - const entries = {}; - - for (const [gloss, branches] of glossTree.entries()) { - const tags = branches.get('_tags') || []; - branches.delete('_tags'); - - const senseTags = [...tags, ...lemmaTags]; - - /** @type {GlossBranch} */ - const syntheticBranch = new Map(); - syntheticBranch.set(gloss, branches); - const {glosses, recognizedTags} = handleNest(syntheticBranch, senseTags, pos); - const joinedTags = recognizedTags.join(' '); - - if(!glosses || !glosses.length) continue; - - if (entries[joinedTags]) { - // entries[joinedTags][5].push(gloss); - entries[joinedTags][5].push(...glosses); - } else { - entries[joinedTags] = [ - term, // term - reading !== normalizedLemma ? reading : '', // reading - joinedTags, // definition_tags - foundPos, // rules - 0, // frequency - glosses, // definitions - 0, // sequence - '', // term_tags - ]; + for (const [pos, etyms] of Object.entries(partsOfSpeechOfWord)) { + for (const [etym_number, info] of Object.entries(etyms)) { + const foundPos = findPartOfSpeech(pos, partsOfSpeech, skippedPartsOfSpeech); + const {glossTree} = info; + + const lemmaTags = [pos]; + ipa.push(...info.ipa); + + /** @type {Object} */ + const entries = {}; + + for (const [gloss, branches] of glossTree.entries()) { + const tags = branches.get('_tags') || []; + branches.delete('_tags'); + + const senseTags = [...tags, ...lemmaTags]; + + /** @type {GlossBranch} */ + const syntheticBranch = new Map(); + syntheticBranch.set(gloss, branches); + const {glosses, recognizedTags} = handleNest(syntheticBranch, senseTags, pos); + const joinedTags = recognizedTags.join(' '); + + if(!glosses || !glosses.length) continue; + + if (entries[joinedTags]) { + // entries[joinedTags][5].push(gloss); + entries[joinedTags][5].push(...glosses); + } else { + entries[joinedTags] = [ + term, // term + reading !== normalizedLemma ? reading : '', // reading + joinedTags, // definition_tags + foundPos, // rules + 0, // frequency + glosses, // definitions + 0, // sequence + '', // term_tags + ]; + } } - } - debug(entries); - for (const [tags, entry] of Object.entries(entries)) { - ymtLemmas.push(entry); + debug(entries); + for (const [tags, entry] of Object.entries(entries)) { + ymtLemmas.push(entry); + } } } diff --git a/data/test/dict/de/en/tag_bank_1.json b/data/test/dict/de/en/tag_bank_1.json index a096849..817a20f 100644 --- a/data/test/dict/de/en/tag_bank_1.json +++ b/data/test/dict/de/en/tag_bank_1.json @@ -103,5 +103,19 @@ -1, "preposition", 1 + ], + [ + "fem", + "", + -1, + "feminine", + 1 + ], + [ + "chem", + "", + 0, + "chemistry", + 0 ] ] \ No newline at end of file diff --git a/data/test/dict/de/en/term_bank_1.json b/data/test/dict/de/en/term_bank_1.json index dd090f3..f3afa68 100644 --- a/data/test/dict/de/en/term_bank_1.json +++ b/data/test/dict/de/en/term_bank_1.json @@ -1122,5 +1122,71 @@ ], 0, "" + ], + [ + "Base", + "", + "arch fem n", + "n", + 0, + [ + { + "type": "structured-content", + "content": [ + { + "tag": "div", + "content": [ + "A female cousin." + ] + } + ] + } + ], + 0, + "" + ], + [ + "Base", + "", + "fem obs n", + "n", + 0, + [ + { + "type": "structured-content", + "content": [ + { + "tag": "div", + "content": [ + "paternal aunt" + ] + } + ] + } + ], + 0, + "" + ], + [ + "Base", + "", + "fem n chem", + "n", + 0, + [ + { + "type": "structured-content", + "content": [ + { + "tag": "div", + "content": [ + "base (compound that will neutralize an acid)" + ] + } + ] + } + ], + 0, + "" ] ] \ No newline at end of file diff --git a/data/test/dict/de/en/term_bank_2.json b/data/test/dict/de/en/term_bank_2.json index 12f8405..8604d73 100644 --- a/data/test/dict/de/en/term_bank_2.json +++ b/data/test/dict/de/en/term_bank_2.json @@ -2317,5 +2317,54 @@ ], 0, "" + ], + [ + "Basen", + "", + "non-lemma", + "", + 0, + [ + [ + "Base", + [ + "plural" + ] + ], + [ + "Base", + [ + "accusative", + "plural", + "definite" + ] + ], + [ + "Base", + [ + "dative", + "plural", + "definite" + ] + ], + [ + "Base", + [ + "genitive", + "plural", + "definite" + ] + ], + [ + "Base", + [ + "nominative", + "plural", + "definite" + ] + ] + ], + 0, + "" ] ] \ No newline at end of file diff --git a/data/test/ipa/de/en/term_meta_bank_1.json b/data/test/ipa/de/en/term_meta_bank_1.json index 2349348..aaa64f3 100644 --- a/data/test/ipa/de/en/term_meta_bank_1.json +++ b/data/test/ipa/de/en/term_meta_bank_1.json @@ -87,5 +87,18 @@ } ] } + ], + [ + "Base", + "ipa", + { + "reading": "Base", + "transcriptions": [ + { + "ipa": "/ˈbaːzə/", + "tags": [] + } + ] + } ] ] \ No newline at end of file diff --git a/data/test/kaikki/de-en.json b/data/test/kaikki/de-en.json index fa8041f..2480080 100644 --- a/data/test/kaikki/de-en.json +++ b/data/test/kaikki/de-en.json @@ -3,3 +3,5 @@ {"pos": "noun", "head_templates": [{"name": "de-noun", "args": {"1": "n,ens:es􂀿very rare􂁀.weak.dat:en:-", "dim": "chen,lein,ken􂀿(also) Ruhrpöttisch􂁀"}, "expansion": "Herz n (weak, genitive Herzens or (very rare) Herzes, plural Herzen, diminutive Herzchen n or Herzlein n or ((also) Ruhrpöttisch) Herzken n)"}], "forms": [{"form": "Ruhrpöttisch", "tags": ["also"]}, {"form": "weak", "source": "declension", "tags": ["table-tags"]}, {"form": "de-ndecl", "source": "declension", "tags": ["inflection-template"]}, {"form": "Herz", "tags": ["nominative", "singular"], "source": "declension"}, {"form": "Herzen", "tags": ["definite", "nominative", "plural"], "source": "declension"}, {"form": "Herzens", "tags": ["genitive", "singular"], "source": "declension"}, {"form": "Herzes", "tags": ["genitive", "singular"], "source": "declension"}, {"form": "Herzen", "tags": ["definite", "genitive", "plural"], "source": "declension"}, {"form": "Herzen", "tags": ["dative", "singular"], "source": "declension"}, {"form": "Herz", "tags": ["dative", "singular"], "source": "declension"}, {"form": "Herzen", "tags": ["dative", "definite", "plural"], "source": "declension"}, {"form": "Herz", "tags": ["accusative", "singular"], "source": "declension"}, {"form": "Herzen", "tags": ["accusative", "definite", "plural"], "source": "declension"}], "inflection_templates": [{"name": "de-ndecl", "args": {"1": "n,ens:es􂀿very rare􂁀.weak.dat:en:-􂀿as a card suit or term of endearment, otherwise informal􂁀"}}], "descendants": [{"depth": 1, "templates": [{"name": "desc", "args": {"1": "mk", "2": "херц", "bor": "1", "g": "m"}, "expansion": "→ Macedonian: херц m (herc)"}], "text": "→ Macedonian: херц m (herc)"}, {"depth": 1, "templates": [{"name": "desc", "args": {"1": "sh", "2": "-", "bor": "1"}, "expansion": "→ Serbo-Croatian:"}], "text": "→ Serbo-Croatian:"}, {"depth": 1, "templates": [{"name": "desc", "args": {"1": "sh", "2": "хе̏рц", "sclb": "1", "g": "m"}, "expansion": "Cyrillic script: хе̏рц m"}], "text": "Cyrillic script: хе̏рц m"}, {"depth": 1, "templates": [{"name": "desc", "args": {"1": "sh", "2": "hȅrc", "sclb": "1", "g": "m"}, "expansion": "Latin script: hȅrc m"}], "text": "Latin script: hȅrc m"}], "sounds": [{"ipa": "/hɛrts/"}, {"ipa": "[hɛʁt͡s]"}, {"ipa": "[hɛɐ̯t͡s]"}, {"homophone": "Hertz"}, {"audio": "De-Herz.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/5/56/De-Herz.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/5/56/De-Herz.ogg/De-Herz.ogg.mp3"}, {"audio": "De-at-Herz.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/a/ae/De-at-Herz.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/a/ae/De-at-Herz.ogg/De-at-Herz.ogg.mp3"}], "etymology_text": "From Middle High German herze, from Old High German herza, from Proto-West Germanic *hertā, from Proto-Germanic *hertô (“heart”), from Proto-Indo-European *ḱḗr (“heart”).\nCognate with Dutch hart, English heart, Danish hjerte, Gothic 𐌷𐌰𐌹𐍂𐍄𐍉 (hairtō).", "etymology_templates": [{"name": "inh", "args": {"1": "de", "2": "gmh", "3": "herze"}, "expansion": "Middle High German herze"}, {"name": "inh", "args": {"1": "de", "2": "goh", "3": "herza"}, "expansion": "Old High German herza"}, {"name": "inh", "args": {"1": "de", "2": "gmw-pro", "3": "*hertā"}, "expansion": "Proto-West Germanic *hertā"}, {"name": "inh", "args": {"1": "de", "2": "gem-pro", "3": "*hertô", "4": "", "5": "heart"}, "expansion": "Proto-Germanic *hertô (“heart”)"}, {"name": "der", "args": {"1": "de", "2": "ine-pro", "3": "*ḱḗr", "4": "", "5": "heart"}, "expansion": "Proto-Indo-European *ḱḗr (“heart”)"}, {"name": "cog", "args": {"1": "nl", "2": "hart"}, "expansion": "Dutch hart"}, {"name": "cog", "args": {"1": "en", "2": "heart"}, "expansion": "English heart"}, {"name": "cog", "args": {"1": "da", "2": "hjerte"}, "expansion": "Danish hjerte"}, {"name": "cog", "args": {"1": "got", "2": "𐌷𐌰𐌹𐍂𐍄𐍉"}, "expansion": "Gothic 𐌷𐌰𐌹𐍂𐍄𐍉 (hairtō)"}], "word": "Herz", "lang": "German", "lang_code": "de", "synonyms": [{"word": "Herze", "_dis1": "0 0 0"}, {"tags": ["obsolete"], "word": "Hertz", "_dis1": "0 0 0"}], "derived": [{"word": "jemandem am Herzen liegen", "_dis1": "0 0 0"}, {"word": "Athletenherz", "_dis1": "0 0 0"}, {"word": "beherzt", "_dis1": "0 0 0"}, {"word": "Bruderherz", "_dis1": "0 0 0"}, {"word": "Hand aufs Herz", "_dis1": "0 0 0"}, {"word": "Herz-Jesu-Bild", "_dis1": "0 0 0"}, {"word": "herzallerliebst", "_dis1": "0 0 0"}, {"word": "herzbewegend", "_dis1": "0 0 0"}, {"word": "Herzblatt", "_dis1": "0 0 0"}, {"word": "Herzblut", "_dis1": "0 0 0"}, {"word": "Herzbube", "_dis1": "0 0 0"}, {"word": "Herzchen", "_dis1": "0 0 0"}, {"word": "Herzchirurgie", "_dis1": "0 0 0"}, {"word": "Herzdame", "_dis1": "0 0 0"}, {"word": "herzhaft", "_dis1": "0 0 0"}, {"word": "herzig", "_dis1": "0 0 0"}, {"tags": ["masculine"], "english": "heart attack", "word": "Herzinfarkt", "_dis1": "0 0 0"}, {"word": "Herzinsuffizienz", "_dis1": "0 0 0"}, {"word": "Herzkammer", "_dis1": "0 0 0"}, {"word": "Herzklabaster", "_dis1": "0 0 0"}, {"word": "Herzklaps", "_dis1": "0 0 0"}, {"word": "Herzkönig", "_dis1": "0 0 0"}, {"word": "Herzkrankheit", "_dis1": "0 0 0"}, {"word": "herzlich", "_dis1": "0 0 0"}, {"word": "herzlos", "_dis1": "0 0 0"}, {"word": "Herzrhythmusstörung", "_dis1": "0 0 0"}, {"word": "Herzschild", "_dis1": "0 0 0"}, {"word": "Herzschlag", "_dis1": "0 0 0"}, {"word": "Herzstillstand", "_dis1": "0 0 0"}, {"word": "Herzton", "_dis1": "0 0 0"}, {"word": "Herzversagen", "_dis1": "0 0 0"}, {"word": "kaltherzig", "_dis1": "0 0 0"}, {"word": "Schwesterherz", "_dis1": "0 0 0"}, {"word": "Sportherz", "_dis1": "0 0 0"}, {"word": "Sportlerherz", "_dis1": "0 0 0"}, {"english": "wholeheartedly", "word": "von ganzem Herzen", "_dis1": "0 0 0"}, {"english": "to take to heart", "word": "zu Herzen nehmen", "_dis1": "0 0 0"}], "related": [{"word": "Kardia", "_dis1": "0 0 0"}, {"word": "Karo", "_dis1": "0 0 0"}, {"word": "Pik", "_dis1": "0 0 0"}, {"word": "Schippe", "_dis1": "0 0 0"}, {"word": "Kreuz", "_dis1": "0 0 0"}, {"word": "Treff", "_dis1": "0 0 0"}, {"word": "Rot", "_dis1": "0 0 0"}, {"word": "Schellen", "_dis1": "0 0 0"}, {"word": "Laub", "_dis1": "0 0 0"}, {"word": "Grün", "_dis1": "0 0 0"}, {"word": "Eichel", "_dis1": "0 0 0"}, {"word": "Eckern", "_dis1": "0 0 0"}], "senses": [{"links": [["heart", "heart"]], "glosses": ["heart"], "tags": ["also", "neuter", "rare"], "id": "en-Herz-de-noun-PLloqYII"}, {"links": [["card game", "card game"], ["hearts", "hearts"]], "raw_glosses": ["(card games) hearts"], "topics": ["card-games", "games"], "glosses": ["hearts"], "tags": ["also", "neuter", "rare"], "id": "en-Herz-de-noun-ybX83RAD", "categories": [{"name": "Card games", "kind": "topical", "parents": ["Games", "Recreation", "Human activity", "Human behaviour", "Human", "All topics", "Fundamental"], "source": "w", "orig": "de:Card games", "langcode": "de"}, {"name": "German entries with incorrect language header", "kind": "other", "parents": ["Entries with incorrect language header", "Entry maintenance"], "source": "w+disamb", "_dis": "5 82 13"}, {"name": "Card games", "kind": "topical", "parents": ["Games", "Recreation", "Human activity", "Human behaviour", "Human", "All topics", "Fundamental"], "source": "w+disamb", "orig": "de:Card games", "langcode": "de", "_dis": "2 93 5"}, {"name": "Organs", "kind": "topical", "parents": ["Body parts", "Body", "Anatomy", "Human", "Biology", "Medicine", "All topics", "Sciences", "Fundamental"], "source": "w+disamb", "orig": "de:Organs", "langcode": "de", "_dis": "5 70 25"}]}, {"links": [["sweetheart", "sweetheart"], ["darling", "darling"]], "glosses": ["sweetheart, darling"], "tags": ["also", "neuter", "rare"], "id": "en-Herz-de-noun-oOGg0s0R"}]} {"pos": "noun", "head_templates": [{"name": "de-noun", "args": {"1": "m", "f": "in"}, "expansion": "Fahrer m (strong, genitive Fahrers, plural Fahrer, feminine Fahrerin)"}], "forms": [{"form": "Fahrers", "tags": ["genitive"]}, {"form": "Fahrer", "tags": ["plural"]}, {"form": "Fahrerin", "tags": ["feminine"]}, {"form": "strong", "source": "declension", "tags": ["table-tags"]}, {"form": "de-ndecl", "source": "declension", "tags": ["inflection-template"]}, {"form": "Fahrer", "tags": ["nominative", "singular"], "source": "declension"}, {"form": "Fahrer", "tags": ["definite", "nominative", "plural"], "source": "declension"}, {"form": "Fahrers", "tags": ["genitive", "singular"], "source": "declension"}, {"form": "Fahrer", "tags": ["definite", "genitive", "plural"], "source": "declension"}, {"form": "Fahrer", "tags": ["dative", "singular"], "source": "declension"}, {"form": "Fahrern", "tags": ["dative", "definite", "plural"], "source": "declension"}, {"form": "Fahrer", "tags": ["accusative", "singular"], "source": "declension"}, {"form": "Fahrer", "tags": ["accusative", "definite", "plural"], "source": "declension"}], "inflection_templates": [{"name": "de-ndecl", "args": {"1": "m"}}], "sounds": [{"ipa": "/ˈfaːʁɐ/"}, {"rhymes": "-aːʁɐ"}, {"audio": "De-at-Fahrer.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/a/aa/De-at-Fahrer.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/a/aa/De-at-Fahrer.ogg/De-at-Fahrer.ogg.mp3"}, {"audio": "De-Fahrer.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/8/8a/De-Fahrer.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/8/8a/De-Fahrer.ogg/De-Fahrer.ogg.mp3"}], "etymology_text": "fahren (“to drive”) + -er", "etymology_templates": [{"name": "suffix", "args": {"1": "de", "2": "fahren", "3": "er", "gloss1": "to drive"}, "expansion": "fahren (“to drive”) + -er"}], "word": "Fahrer", "lang": "German", "lang_code": "de", "senses": [{"links": [["fahren", "fahren#German"], ["driver", "driver"]], "glosses": ["agent noun of fahren; driver (person)"], "tags": ["agent", "form-of", "masculine", "strong"], "form_of": [{"word": "fahren", "extra": "driver (person)"}], "id": "en-Fahrer-de-noun-yy2lWCGM", "categories": [{"name": "German entries with incorrect language header", "kind": "other", "parents": ["Entries with incorrect language header", "Entry maintenance"], "source": "w"}, {"name": "German terms suffixed with -er", "kind": "other", "parents": [], "source": "w"}], "derived": [{"word": "Autofahrer"}, {"word": "Bahnfahrer"}, {"word": "Busfahrer"}, {"word": "Mondfahrer"}, {"word": "Raumfahrer"}, {"word": "Sonntagsfahrer"}], "related": [{"word": "fahren"}]}]} {"pos": "prep", "head_templates": [{"name": "head", "args": {"1": "de", "2": "preposition"}, "expansion": "von"}], "forms": [{"form": "von [with dative]", "tags": ["canonical"]}], "sounds": [{"ipa": "/fɔn/"}, {"ipa": "[fɔn]"}, {"audio": "De-von.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/b/ba/De-von.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/b/ba/De-von.ogg/De-von.ogg.mp3"}], "etymology_text": "From Middle High German von (“from”), from Old High German fon, fona (“from”), from Proto-Germanic *afanē, *fanē, *funē (“from”), compound of *afa (from Proto-Indo-European *h₂epó (“from, off”)) + *ana (from Proto-Indo-European *h₂en- (“on”)). Cognate with Old Saxon fana, fan (“from”), Dutch van (“from; of”), Old Frisian fon (“from”).", "etymology_templates": [{"name": "inh", "args": {"1": "de", "2": "gmh", "3": "von", "4": "", "5": "from"}, "expansion": "Middle High German von (“from”)"}, {"name": "inh", "args": {"1": "de", "2": "goh", "3": "fon"}, "expansion": "Old High German fon"}, {"name": "inh", "args": {"1": "de", "2": "gem-pro", "3": "*afanē"}, "expansion": "Proto-Germanic *afanē"}, {"name": "der", "args": {"1": "de", "2": "ine-pro", "3": "*h₂epó", "4": "", "5": "from, off"}, "expansion": "Proto-Indo-European *h₂epó (“from, off”)"}, {"name": "der", "args": {"1": "de", "2": "ine-pro", "3": "*h₂en-", "4": "", "5": "on"}, "expansion": "Proto-Indo-European *h₂en- (“on”)"}, {"name": "cog", "args": {"1": "osx", "2": "fana"}, "expansion": "Old Saxon fana"}, {"name": "cog", "args": {"1": "nl", "2": "van", "3": "", "4": "from; of"}, "expansion": "Dutch van (“from; of”)"}, {"name": "cog", "args": {"1": "ofs", "2": "fon", "3": "", "4": "from"}, "expansion": "Old Frisian fon (“from”)"}], "word": "von", "lang": "German", "lang_code": "de", "synonyms": [{"tags": ["abbreviation"], "word": "v.", "_dis1": "0 0 0 0 0"}], "derived": [{"word": "vom", "_dis1": "0 0 0 0 0"}, {"word": "wovon", "_dis1": "0 0 0 0 0"}, {"word": "davon", "_dis1": "0 0 0 0 0"}, {"word": "hiervon", "_dis1": "0 0 0 0 0"}, {"word": "voneinander", "_dis1": "0 0 0 0 0"}], "related": [{"word": "-s", "_dis1": "0 0 0 0 0"}], "senses": [{"examples": [{"text": "Ich fahre von Köln nach Hamburg.", "english": "I'm travelling from Cologne to Hamburg.", "type": "example"}, {"text": "Ich hab’s von meiner Schwester gehört.", "english": "I heard it from my sister.", "type": "example"}], "links": [["from", "from"]], "glosses": ["from"], "id": "en-von-de-prep-dYV6RYmZ", "categories": []}, {"examples": [{"text": "das Auto meines Vaters = das Auto von meinem Vater", "english": "my father’s car / the car of my father", "type": "example"}], "links": [["of", "of"]], "glosses": ["of, belonging to (often replacing genitive; see usage note below)"], "id": "en-von-de-prep-dhi3s2Ke", "categories": [{"name": "German usage examples with omitted translation", "kind": "other", "parents": ["Usage examples with omitted translation", "Entry maintenance"], "source": "w"}, {"name": "German entries with incorrect language header", "kind": "other", "parents": ["Entries with incorrect language header", "Entry maintenance"], "source": "w+disamb", "_dis": "13 67 0 4 16"}, {"name": "German prepositions", "kind": "other", "parents": [], "source": "w+disamb", "_dis": "19 30 14 16 20"}]}, {"examples": [{"text": "Das Hotel wird von der Firma bezahlt.", "english": "The hotel is paid for by the company.", "type": "example"}], "links": [["by", "by"]], "synonyms": [{"word": "durch"}], "glosses": ["by (with passive voice)"], "id": "en-von-de-prep-CQir5ilW", "categories": []}, {"examples": [{"text": "Er hat von seiner Jugend erzählt.", "english": "He told about his youth.", "type": "example"}, {"text": "Von dem Nomine Substantivo, oder dem Hauptworte.", "ref": "1796, Abraham Sahlstedt, Schwedische Grammatik nach dem Sprachgebrauch unserer Zeiten, Lübeck & Leipzig, page 259", "english": "About the substantive noun, or the [alternative term]. (headline)", "type": "quotation"}], "links": [["about", "about"], ["of", "of"]], "glosses": ["about, of (a topic)"], "id": "en-von-de-prep-s-HPCjrD", "categories": []}, {"examples": [{"text": "Von welchem Geld soll ich als Arbeitsloser in Urlaub fahren?", "english": "Being unemployed, on what money should I go on holidays?", "type": "example"}, {"text": "Man kann nicht nur von Luft und Liebe leben.", "english": "You can’t live on air and love alone. (proverb)", "type": "example"}], "links": [["on", "on"], ["with", "with"]], "glosses": ["on, with (a resource)"], "id": "en-von-de-prep-QAf~aDYH", "categories": []}]} +{"pos": "noun", "head_templates": [{"name": "de-noun", "args": {"1": "f"}, "expansion": "Base f (genitive Base, plural Basen)"}], "forms": [{"form": "Base", "tags": ["genitive"]}, {"form": "Basen", "tags": ["plural"]}, {"form": "no-table-tags", "source": "declension", "tags": ["table-tags"]}, {"form": "de-ndecl", "source": "declension", "tags": ["inflection-template"]}, {"form": "Base", "tags": ["nominative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["definite", "nominative", "plural"], "source": "declension"}, {"form": "Base", "tags": ["genitive", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["definite", "genitive", "plural"], "source": "declension"}, {"form": "Base", "tags": ["dative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["dative", "definite", "plural"], "source": "declension"}, {"form": "Base", "tags": ["accusative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["accusative", "definite", "plural"], "source": "declension"}], "inflection_templates": [{"name": "de-ndecl", "args": {"1": "f"}}], "etymology_number": 1, "etymology_text": "From Middle High German base, from Old High German basa, from Proto-Germanic *baswǭ (“father's sister; paternal aunt”). Compare Saterland Frisian Bääsje (“grandmother”), Dutch baas (“master; boss”). More at boss.", "etymology_templates": [{"name": "inh", "args": {"1": "de", "2": "gmh", "3": "base"}, "expansion": "Middle High German base"}, {"name": "inh", "args": {"1": "de", "2": "goh", "3": "basa"}, "expansion": "Old High German basa"}, {"name": "inh", "args": {"1": "de", "2": "gem-pro", "3": "*baswǭ", "t": "father's sister; paternal aunt"}, "expansion": "Proto-Germanic *baswǭ (“father's sister; paternal aunt”)"}, {"name": "cog", "args": {"1": "stq", "2": "Bääsje", "t": "grandmother"}, "expansion": "Saterland Frisian Bääsje (“grandmother”)"}, {"name": "cog", "args": {"1": "nl", "2": "baas", "t": "master; boss"}, "expansion": "Dutch baas (“master; boss”)"}], "word": "Base", "lang": "German", "lang_code": "de", "wikipedia": ["de:Base"], "sounds": [{"ipa": "/ˈbaːzə/"}, {"audio": "De-Base.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/2/2b/De-Base.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/2/2b/De-Base.ogg/De-Base.ogg.mp3"}, {"rhymes": "-aːzə"}], "senses": [{"links": [["cousin", "cousin"]], "synonyms": [{"word": "Cousine"}, {"word": "Kusine"}], "raw_glosses": ["(archaic) A female cousin."], "glosses": ["A female cousin."], "tags": ["archaic", "feminine"], "id": "en-Base-de-noun-9NsNEBzv", "categories": []}, {"links": [["paternal", "paternal"], ["aunt", "aunt"]], "synonyms": [{"word": "Vaterschwester"}], "raw_glosses": ["(obsolete) paternal aunt"], "glosses": ["paternal aunt"], "tags": ["feminine", "obsolete"], "id": "en-Base-de-noun-Pdq-m1bA", "categories": [{"name": "Female family members", "kind": "topical", "parents": ["Family members", "Female people", "Family", "Female", "People", "Gender", "Human", "Biology", "Psychology", "Sociology", "All topics", "Sciences", "Social sciences", "Fundamental", "Society"], "source": "w+disamb", "orig": "de:Female family members", "langcode": "de", "_dis": "13 81 6"}]}]} +{"pos": "noun", "head_templates": [{"name": "de-noun", "args": {"1": "f"}, "expansion": "Base f (genitive Base, plural Basen)"}], "forms": [{"form": "Base", "tags": ["genitive"]}, {"form": "Basen", "tags": ["plural"]}, {"form": "no-table-tags", "source": "declension", "tags": ["table-tags"]}, {"form": "de-ndecl", "source": "declension", "tags": ["inflection-template"]}, {"form": "Base", "tags": ["nominative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["definite", "nominative", "plural"], "source": "declension"}, {"form": "Base", "tags": ["genitive", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["definite", "genitive", "plural"], "source": "declension"}, {"form": "Base", "tags": ["dative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["dative", "definite", "plural"], "source": "declension"}, {"form": "Base", "tags": ["accusative", "singular"], "source": "declension"}, {"form": "Basen", "tags": ["accusative", "definite", "plural"], "source": "declension"}], "inflection_templates": [{"name": "de-ndecl", "args": {"1": "f"}}], "etymology_number": 2, "etymology_text": "19th c., backformation from Basen, plural of Basis, from Latin basis, from Ancient Greek βάσις (básis).", "etymology_templates": [{"name": "der", "args": {"1": "de", "2": "la", "3": "basis"}, "expansion": "Latin basis"}, {"name": "der", "args": {"1": "de", "2": "grc", "3": "βάσις"}, "expansion": "Ancient Greek βάσις (básis)"}], "word": "Base", "lang": "German", "lang_code": "de", "wikipedia": ["de:Base"], "sounds": [{"ipa": "/ˈbaːzə/"}, {"audio": "De-Base.ogg", "ogg_url": "https://upload.wikimedia.org/wikipedia/commons/2/2b/De-Base.ogg", "mp3_url": "https://upload.wikimedia.org/wikipedia/commons/transcoded/2/2b/De-Base.ogg/De-Base.ogg.mp3"}, {"rhymes": "-aːzə"}], "senses": [{"links": [["chemistry", "chemistry"], ["base", "base"]], "raw_glosses": ["(chemistry) base (compound that will neutralize an acid)"], "topics": ["chemistry", "natural-sciences", "physical-sciences"], "glosses": ["base (compound that will neutralize an acid)"], "tags": ["feminine"], "id": "en-Base-de-noun-1qrlYxcK", "categories": [{"name": "Chemistry", "kind": "topical", "parents": ["Sciences", "All topics", "Fundamental"], "source": "w", "orig": "de:Chemistry", "langcode": "de"}, {"name": "German entries with incorrect language header", "kind": "other", "parents": ["Entries with incorrect language header", "Entry maintenance"], "source": "w+disamb", "_dis": "7 27 66"}, {"name": "Pages with 3 entries", "kind": "other", "parents": [], "source": "w+disamb", "_dis": "8 24 67"}, {"name": "Pages with entries", "kind": "other", "parents": [], "source": "w+disamb", "_dis": "7 19 74"}]}]} diff --git a/data/test/tidy/cs-en-lemmas.json b/data/test/tidy/cs-en-lemmas.json index b2df32a..b3fb7a3 100644 --- a/data/test/tidy/cs-en-lemmas.json +++ b/data/test/tidy/cs-en-lemmas.json @@ -2,70 +2,72 @@ "zpráva": { "zpráva": { "noun": { - "ipa": [ - { - "ipa": "[ˈspraːva]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "message", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "[ˈspraːva]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "message", + { + "_type": "map", + "map": [ [ - "feminine" - ] - ], - [ - "_examples", + "_tags", + [ + "feminine" + ] + ], [ - { - "text": "textová zpráva", - "english": "text message" - }, - { - "text": "Chcete nechat zprávu?", - "english": "Would you like to leave a message?" - } + "_examples", + [ + { + "text": "textová zpráva", + "english": "text message" + }, + { + "text": "Chcete nechat zprávu?", + "english": "Would you like to leave a message?" + } + ] ] ] - ] - } - ], - [ - "report", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "report", + { + "_type": "map", + "map": [ [ - "feminine" - ] - ], - [ - "_examples", + "_tags", + [ + "feminine" + ] + ], [ - { - "text": "lékařská zpráva", - "english": "medical report" - }, - { - "text": "podat zprávu", - "english": "to file a report" - } + "_examples", + [ + { + "text": "lékařská zpráva", + "english": "medical report" + }, + { + "text": "podat zprávu", + "english": "to file a report" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -73,37 +75,39 @@ "pro": { "pro": { "prep": { - "ipa": [ - { - "ipa": "[ˈpro]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "for", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + "1": { + "ipa": [ + { + "ipa": "[ˈpro]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "for", + { + "_type": "map", + "map": [ [ - { - "text": "Zabili ho pro peníze.", - "english": "They killed him for his money." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "Zabili ho pro peníze.", + "english": "They killed him for his money." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -111,36 +115,38 @@ "přít": { "přít": { "verb": { - "ipa": [ - { - "ipa": "[ˈpr̝̊iːt]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(reflexive with se) to dispute", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "[ˈpr̝̊iːt]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(reflexive with se) to dispute", + { + "_type": "map", + "map": [ [ - "imperfective", - "reflexive", - "with se" + "_tags", + [ + "imperfective", + "reflexive", + "with se" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/de-en-forms-0.json b/data/test/tidy/de-en-forms-0.json index 2ad628c..890fafe 100644 --- a/data/test/tidy/de-en-forms-0.json +++ b/data/test/tidy/de-en-forms-0.json @@ -1480,6 +1480,32 @@ ] ] } + ], + [ + "Base", + { + "_type": "map", + "map": [ + [ + "Basen", + { + "_type": "map", + "map": [ + [ + "noun", + [ + "plural", + "accusative plural definite", + "dative plural definite", + "genitive plural definite", + "nominative plural definite" + ] + ] + ] + } + ] + ] + } ] ] } \ No newline at end of file diff --git a/data/test/tidy/de-en-lemmas.json b/data/test/tidy/de-en-lemmas.json index 6a7a79d..1b3869d 100644 --- a/data/test/tidy/de-en-lemmas.json +++ b/data/test/tidy/de-en-lemmas.json @@ -2,216 +2,218 @@ "pflegen": { "pflegen": { "verb": { - "ipa": [ - { - "ipa": "/ˈpfleːɡən/", - "tags": [] - }, - { - "ipa": "[ˈpfleːɡən]", - "tags": [] - }, - { - "ipa": "[ˈpfleːɡŋ̩]", - "tags": [] - }, - { - "ipa": "/ˈfleːɡən/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "Providing care or service for someone/something. [weak verb]", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "class-4", - "strong", - "transitive" - ] - ], - [ - "(transitive, medicine) to nurse; to care for someone in poor health", - { - "_type": "map", - "map": [ - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "/ˈpfleːɡən/", + "tags": [] + }, + { + "ipa": "[ˈpfleːɡən]", + "tags": [] + }, + { + "ipa": "[ˈpfleːɡŋ̩]", + "tags": [] + }, + { + "ipa": "/ˈfleːɡən/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "Providing care or service for someone/something. [weak verb]", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "class-4", + "strong", + "transitive" + ] + ], + [ + "(transitive, medicine) to nurse; to care for someone in poor health", + { + "_type": "map", + "map": [ [ - { - "text": "jemanden gesund pflegen", - "english": "to nurse someone back to health" - }, - { - "text": "Kranke pflegen", - "english": "to care for the sick" - } + "_examples", + [ + { + "text": "jemanden gesund pflegen", + "english": "to nurse someone back to health" + }, + { + "text": "Kranke pflegen", + "english": "to care for the sick" + } + ] ] ] - ] - } - ], - [ - "(transitive) to take care of, to tend to, to maintain", - { - "_type": "map", - "map": [ - [ - "_examples", + } + ], + [ + "(transitive) to take care of, to tend to, to maintain", + { + "_type": "map", + "map": [ [ + "_examples", + [ + { + "text": "sein Äußeres pflegen", + "english": "to take care of one's appearance" + }, + { + "text": "die Zähne pflegen", + "english": "to take care of (one's) teeth" + } + ] + ], + [ + "(intransitive, archaic, with genitive)", { - "text": "sein Äußeres pflegen", - "english": "to take care of one's appearance" - }, - { - "text": "die Zähne pflegen", - "english": "to take care of (one's) teeth" + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] } ] - ], - [ - "(intransitive, archaic, with genitive)", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] - ] - } ] - ] - } - ] - ] - } - ], - [ - "To improve or care for something in an intellectual sense. [weak or strong verb]", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "class-4", - "strong" + } ] - ], - [ - "_examples", - [] - ], - [ - "(transitive) to cultivate; to foster; to nurture; to maintain", - { - "_type": "map", - "map": [ - [ - "_examples", + ] + } + ], + [ + "To improve or care for something in an intellectual sense. [weak or strong verb]", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "class-4", + "strong" + ] + ], + [ + "_examples", + [] + ], + [ + "(transitive) to cultivate; to foster; to nurture; to maintain", + { + "_type": "map", + "map": [ [ + "_examples", + [ + { + "text": "Freundschaften pflegen", + "english": "to cultivate friendships" + }, + { + "text": "Beziehungen pflegen", + "english": "to cultivate relationships" + } + ] + ], + [ + "(intransitive, higher register or poetic, with genitive)", { - "text": "Freundschaften pflegen", - "english": "to cultivate friendships" - }, - { - "text": "Beziehungen pflegen", - "english": "to cultivate relationships" - } - ] - ], - [ - "(intransitive, higher register or poetic, with genitive)", - { - "_type": "map", - "map": [ - [ - "_examples", + "_type": "map", + "map": [ [ - { - "text": "der Liebe pflegen", - "english": "to cultivate/nurture love" - }, - { - "text": "der Ruhe pflegen", - "english": "to foster tranquility" - } + "_examples", + [ + { + "text": "der Liebe pflegen", + "english": "to cultivate/nurture love" + }, + { + "text": "der Ruhe pflegen", + "english": "to foster tranquility" + } + ] ] ] - ] - } + } + ] ] - ] - } - ] - ] - } - ], - [ - "Expressing habituality. [weak or strong verb]", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "class-4", - "strong" + } ] - ], - [ - "(transitive) to carry out regularly", - { - "_type": "map", - "map": [ - [ - "_examples", + ] + } + ], + [ + "Expressing habituality. [weak or strong verb]", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "class-4", + "strong" + ] + ], + [ + "(transitive) to carry out regularly", + { + "_type": "map", + "map": [ [ - { - "text": "Umgang pflegen", - "english": "to regularly be in contact" - }, - { - "text": "Geselligkeit pflegen", - "english": "to socialize regularly (literally, “to regularly engage in gregariousness”)" - } + "_examples", + [ + { + "text": "Umgang pflegen", + "english": "to regularly be in contact" + }, + { + "text": "Geselligkeit pflegen", + "english": "to socialize regularly (literally, “to regularly engage in gregariousness”)" + } + ] ] ] - ] - } - ], - [ - "(intransitive, with “zu” followed by an infinitive verb) to perform habitually; to be accustomed (to doing something); to be in the habit (of doing something)", - { - "_type": "map", - "map": [ - [ - "_examples", + } + ], + [ + "(intransitive, with “zu” followed by an infinitive verb) to perform habitually; to be accustomed (to doing something); to be in the habit (of doing something)", + { + "_type": "map", + "map": [ [ - { - "text": "Ich pflege zu laufen.", - "english": "I usually walk." - }, - { - "text": "Er pflegte zu reisen.", - "english": "He used to travel." - } + "_examples", + [ + { + "text": "Ich pflege zu laufen.", + "english": "I usually walk." + }, + { + "text": "Er pflegte zu reisen.", + "english": "He used to travel." + } + ] ] ] - ] - } + } + ] ] - ] - } + } + ] ] - ] + } } } } @@ -219,231 +221,233 @@ "Fuchs": { "Fuchs": { "noun": { - "ipa": [ - { - "ipa": "/fʊks/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "fox (animal)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "strong" - ] - ], - [ - "_examples", + "1": { + "ipa": [ + { + "ipa": "/fʊks/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "fox (animal)", + { + "_type": "map", + "map": [ [ - { - "text": "Fuchs, du hast die Gans gestohlen. Gib sie wieder her!", - "english": "(line from a popular children’s song)" - } + "_tags", + [ + "masculine", + "strong" + ] + ], + [ + "_examples", + [ + { + "text": "Fuchs, du hast die Gans gestohlen. Gib sie wieder her!", + "english": "(line from a popular children’s song)" + } + ] ] ] - ] - } - ], - [ - "(informal) a clever or cunning person", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "informal", - "masculine", - "strong" - ] - ], - [ - "_examples", + } + ], + [ + "(informal) a clever or cunning person", + { + "_type": "map", + "map": [ [ - { - "text": "Er ist ein ganz schöner Fuchs.", - "english": "He is a really handsome fox." - } + "_tags", + [ + "informal", + "masculine", + "strong" + ] + ], + [ + "_examples", + [ + { + "text": "Er ist ein ganz schöner Fuchs.", + "english": "He is a really handsome fox." + } + ] ] ] - ] - } - ], - [ - "(informal) a red-haired person or horse.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "informal", - "masculine", - "strong" - ] - ], - [ - "_examples", + } + ], + [ + "(informal) a red-haired person or horse.", + { + "_type": "map", + "map": [ [ - { - "text": "Unser Paul ist ja ein kleiner Fuchs.", - "english": "Our Paul is a little redhead." - } + "_tags", + [ + "informal", + "masculine", + "strong" + ] + ], + [ + "_examples", + [ + { + "text": "Unser Paul ist ja ein kleiner Fuchs.", + "english": "Our Paul is a little redhead." + } + ] ] ] - ] - } - ], - [ - "pledge (prospective member of a fraternity)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "strong" + } + ], + [ + "pledge (prospective member of a fraternity)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(military, slang) A new recruit.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "slang", - "strong" + } + ], + [ + "(military, slang) A new recruit.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine", + "slang", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(card games) In Doppelkopf, the ace of diamonds, which earns a side of players an extra point if they win it from the other side", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "strong" - ] - ], - [ - "_examples", + } + ], + [ + "(card games) In Doppelkopf, the ace of diamonds, which earns a side of players an extra point if they win it from the other side", + { + "_type": "map", + "map": [ [ - { - "text": "Ich hatte nur vier Trümpfe und darunter beide Füchse.", - "english": "I had only four trumps and among them were both aces of diamonds." - } + "_tags", + [ + "masculine", + "strong" + ] + ], + [ + "_examples", + [ + { + "text": "Ich hatte nur vier Trümpfe und darunter beide Füchse.", + "english": "I had only four trumps and among them were both aces of diamonds." + } + ] ] ] - ] - } - ], - [ - "(military) a tank Transportpanzer Fuchs", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "strong" + } + ], + [ + "(military) a tank Transportpanzer Fuchs", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(archaic) A form of sunscald on hops.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "archaic", - "masculine", - "strong" + } + ], + [ + "(archaic) A form of sunscald on hops.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "archaic", + "masculine", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "a fox in radiosport foxhunt", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "strong" + } + ], + [ + "a fox in radiosport foxhunt", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(obsolete) any gold coin", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "masculine", - "obsolete", - "strong" + } + ], + [ + "(obsolete) any gold coin", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine", + "obsolete", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -451,84 +455,86 @@ "Herz": { "Herz": { "noun": { - "ipa": [ - { - "ipa": "/hɛrts/", - "tags": [] - }, - { - "ipa": "[hɛʁt͡s]", - "tags": [] - }, - { - "ipa": "[hɛɐ̯t͡s]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "heart", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "also", - "neuter", - "rare" + "0": { + "ipa": [ + { + "ipa": "/hɛrts/", + "tags": [] + }, + { + "ipa": "[hɛʁt͡s]", + "tags": [] + }, + { + "ipa": "[hɛɐ̯t͡s]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "heart", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "also", + "neuter", + "rare" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(card games) hearts", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "also", - "neuter", - "rare" + } + ], + [ + "(card games) hearts", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "also", + "neuter", + "rare" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "sweetheart, darling", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "also", - "neuter", - "rare" + } + ], + [ + "sweetheart, darling", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "also", + "neuter", + "rare" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -536,37 +542,39 @@ "Fahrer": { "Fahrer": { "noun": { - "ipa": [ - { - "ipa": "/ˈfaːʁɐ/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "agent noun of fahren; driver (person)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "agent", - "form-of", - "masculine", - "strong" + "0": { + "ipa": [ + { + "ipa": "/ˈfaːʁɐ/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "agent noun of fahren; driver (person)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "agent", + "form-of", + "masculine", + "strong" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -574,137 +582,227 @@ "von": { "von": { "prep": { - "ipa": [ - { - "ipa": "/fɔn/", - "tags": [] - }, - { - "ipa": "[fɔn]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "from", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "/fɔn/", + "tags": [] + }, + { + "ipa": "[fɔn]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "from", + { + "_type": "map", + "map": [ [ - { - "text": "Ich fahre von Köln nach Hamburg.", - "english": "I'm travelling from Cologne to Hamburg." - }, - { - "text": "Ich hab’s von meiner Schwester gehört.", - "english": "I heard it from my sister." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "Ich fahre von Köln nach Hamburg.", + "english": "I'm travelling from Cologne to Hamburg." + }, + { + "text": "Ich hab’s von meiner Schwester gehört.", + "english": "I heard it from my sister." + } + ] ] ] - ] - } - ], - [ - "of, belonging to (often replacing genitive; see usage note below)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "of, belonging to (often replacing genitive; see usage note below)", + { + "_type": "map", + "map": [ [ - { - "text": "das Auto meines Vaters = das Auto von meinem Vater", - "english": "my father’s car / the car of my father" - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "das Auto meines Vaters = das Auto von meinem Vater", + "english": "my father’s car / the car of my father" + } + ] ] ] - ] - } - ], - [ - "by (with passive voice)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "by (with passive voice)", + { + "_type": "map", + "map": [ [ - { - "text": "Das Hotel wird von der Firma bezahlt.", - "english": "The hotel is paid for by the company." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "Das Hotel wird von der Firma bezahlt.", + "english": "The hotel is paid for by the company." + } + ] ] ] - ] - } - ], - [ - "about, of (a topic)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "about, of (a topic)", + { + "_type": "map", + "map": [ [ - { - "text": "Er hat von seiner Jugend erzählt.", - "english": "He told about his youth." - }, - { - "text": "Von dem Nomine Substantivo, oder dem Hauptworte.", - "english": "About the substantive noun, or the [alternative term]. (headline)" - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "Er hat von seiner Jugend erzählt.", + "english": "He told about his youth." + }, + { + "text": "Von dem Nomine Substantivo, oder dem Hauptworte.", + "english": "About the substantive noun, or the [alternative term]. (headline)" + } + ] ] ] - ] - } - ], - [ - "on, with (a resource)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "on, with (a resource)", + { + "_type": "map", + "map": [ [ - { - "text": "Von welchem Geld soll ich als Arbeitsloser in Urlaub fahren?", - "english": "Being unemployed, on what money should I go on holidays?" - }, - { - "text": "Man kann nicht nur von Luft und Liebe leben.", - "english": "You can’t live on air and love alone. (proverb)" - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "Von welchem Geld soll ich als Arbeitsloser in Urlaub fahren?", + "english": "Being unemployed, on what money should I go on holidays?" + }, + { + "text": "Man kann nicht nur von Luft und Liebe leben.", + "english": "You can’t live on air and love alone. (proverb)" + } + ] ] ] - ] - } + } + ] ] - ] + } + } + } + } + }, + "Base": { + "Base": { + "noun": { + "1": { + "ipa": [ + { + "ipa": "/ˈbaːzə/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(archaic) A female cousin.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "archaic", + "feminine" + ] + ], + [ + "_examples", + [] + ] + ] + } + ], + [ + "(obsolete) paternal aunt", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "feminine", + "obsolete" + ] + ], + [ + "_examples", + [] + ] + ] + } + ] + ] + } + }, + "2": { + "ipa": [ + { + "ipa": "/ˈbaːzə/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(chemistry) base (compound that will neutralize an acid)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "feminine" + ] + ], + [ + "_examples", + [] + ] + ] + } + ] + ] + } } } } diff --git a/data/test/tidy/en-de-lemmas.json b/data/test/tidy/en-de-lemmas.json index a815dd8..c8e3497 100644 --- a/data/test/tidy/en-de-lemmas.json +++ b/data/test/tidy/en-de-lemmas.json @@ -2,32 +2,34 @@ "choose": { "choose": { "verb": { - "ipa": [ - { - "ipa": "tʃuːz", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "[1] aussuchen, auswählen, vorziehen, wählen", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "tʃuːz", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "[1] aussuchen, auswählen, vorziehen, wählen", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/en-en-lemmas.json b/data/test/tidy/en-en-lemmas.json index 3d3b4a5..f1f25b2 100644 --- a/data/test/tidy/en-en-lemmas.json +++ b/data/test/tidy/en-en-lemmas.json @@ -2,158 +2,160 @@ "bring": { "bring": { "verb": { - "ipa": [ - { - "ipa": "/ˈbɹɪŋ/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(transitive, ditransitive) To transport toward somebody/somewhere.", - { - "_type": "map", - "map": [ - [ - "_tags", + "1": { + "ipa": [ + { + "ipa": "/ˈbɹɪŋ/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(transitive, ditransitive) To transport toward somebody/somewhere.", + { + "_type": "map", + "map": [ [ - "ditransitive", - "transitive" - ] - ], - [ - "_examples", + "_tags", + [ + "ditransitive", + "transitive" + ] + ], [ - { - "text": "Waiter, please bring me a single malt whiskey." - } + "_examples", + [ + { + "text": "Waiter, please bring me a single malt whiskey." + } + ] ] ] - ] - } - ], - [ - "(transitive, figuratively) To supply or contribute.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(transitive, figuratively) To supply or contribute.", + { + "_type": "map", + "map": [ [ - "figuratively", - "transitive" - ] - ], - [ - "_examples", + "_tags", + [ + "figuratively", + "transitive" + ] + ], [ - { - "text": "The new company director brought a fresh perspective on sales and marketing." - } + "_examples", + [ + { + "text": "The new company director brought a fresh perspective on sales and marketing." + } + ] ] ] - ] - } - ], - [ - "(transitive) To occasion or bring about.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(transitive) To occasion or bring about.", + { + "_type": "map", + "map": [ [ - "transitive" - ] - ], - [ - "_examples", + "_tags", + [ + "transitive" + ] + ], [ - { - "text": "The controversial TV broadcast brought a storm of complaints." - } + "_examples", + [ + { + "text": "The controversial TV broadcast brought a storm of complaints." + } + ] ] ] - ] - } - ], - [ - "(transitive) To raise (a lawsuit, charges, etc.) against somebody.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(transitive) To raise (a lawsuit, charges, etc.) against somebody.", + { + "_type": "map", + "map": [ [ - "transitive" + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "To persuade; to induce; to draw; to lead; to guide.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "To persuade; to induce; to draw; to lead; to guide.", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "To produce in exchange; to sell for; to fetch.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "To produce in exchange; to sell for; to fetch.", + { + "_type": "map", + "map": [ [ - { - "text": "What does coal bring per ton?" - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "What does coal bring per ton?" + } + ] ] ] - ] - } - ], - [ - "(baseball) To pitch, often referring to a particularly hard thrown fastball.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "(baseball) To pitch, often referring to a particularly hard thrown fastball.", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], [ - { - "text": "The closer Jones can really bring it." - } + "_examples", + [ + { + "text": "The closer Jones can really bring it." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -161,39 +163,41 @@ "wain": { "wain": { "noun": { - "ipa": [ - { - "ipa": "/weɪn/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(archaic or literary) A wagon; a four-wheeled cart for hauling loads, usually pulled by horses or oxen.", - { - "_type": "map", - "map": [ - [ - "_tags", + "1": { + "ipa": [ + { + "ipa": "/weɪn/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(archaic or literary) A wagon; a four-wheeled cart for hauling loads, usually pulled by horses or oxen.", + { + "_type": "map", + "map": [ [ - "archaic", - "literary" - ] - ], - [ - "_examples", + "_tags", + [ + "archaic", + "literary" + ] + ], [ - { - "text": "\"The Hay Wain\" is a famous painting by John Constable." - } + "_examples", + [ + { + "text": "\"The Hay Wain\" is a famous painting by John Constable." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -201,100 +205,102 @@ "falcon": { "falcon": { "noun": { - "ipa": [ - { - "ipa": "/ˈfɔː(l)kən/", - "tags": [ - "Received-Pronunciation" - ] - }, - { - "ipa": "/ˈfɒlkən/", - "tags": [ - "Received-Pronunciation" - ] - }, - { - "ipa": "/ˈfælkən/", - "tags": [ - "US", - "General-Australian" - ] - }, - { - "ipa": "/ˈfɑːlkən/", - "tags": [ - "US" - ] - }, - { - "ipa": "/ˈfoːlkən/", - "tags": [ - "General-Australian", - "New-Zealand" - ] - }, - { - "ipa": "/ˈfɛlkən/", - "tags": [ - "New-Zealand" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "Any bird of the genus Falco, all of which are birds of prey.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "/ˈfɔː(l)kən/", + "tags": [ + "Received-Pronunciation" + ] + }, + { + "ipa": "/ˈfɒlkən/", + "tags": [ + "Received-Pronunciation" + ] + }, + { + "ipa": "/ˈfælkən/", + "tags": [ + "US", + "General-Australian" + ] + }, + { + "ipa": "/ˈfɑːlkən/", + "tags": [ + "US" + ] + }, + { + "ipa": "/ˈfoːlkən/", + "tags": [ + "General-Australian", + "New-Zealand" + ] + }, + { + "ipa": "/ˈfɛlkən/", + "tags": [ + "New-Zealand" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "Any bird of the genus Falco, all of which are birds of prey.", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "(falconry) A female such bird, a male being a tiercel.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "(falconry) A female such bird, a male being a tiercel.", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "(historical) A light cannon used from the 15th to the 17th century; a falconet.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(historical) A light cannon used from the 15th to the 17th century; a falconet.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "historical" + ] + ], [ - "historical" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/es-en-lemmas.json b/data/test/tidy/es-en-lemmas.json index 9b267b7..95db7e1 100644 --- a/data/test/tidy/es-en-lemmas.json +++ b/data/test/tidy/es-en-lemmas.json @@ -2,106 +2,108 @@ "vivir": { "vivir": { "verb": { - "ipa": [ - { - "ipa": "/biˈbiɾ/", - "tags": [] - }, - { - "ipa": "[biˈβ̞iɾ]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(intransitive) to live; to be alive", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "/biˈbiɾ/", + "tags": [] + }, + { + "ipa": "[biˈβ̞iɾ]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(intransitive) to live; to be alive", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "intransitive" + ] + ], [ - "intransitive" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(intransitive) to make a living, to live on", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(intransitive) to make a living, to live on", + { + "_type": "map", + "map": [ [ - "intransitive" - ] - ], - [ - "_examples", + "_tags", + [ + "intransitive" + ] + ], [ - { - "text": "Vive de migas, nada más.", - "english": "He lives on crumbs, nothing more." - } + "_examples", + [ + { + "text": "Vive de migas, nada más.", + "english": "He lives on crumbs, nothing more." + } + ] ] ] - ] - } - ], - [ - "(intransitive) to live in, reside, inhabit", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(intransitive) to live in, reside, inhabit", + { + "_type": "map", + "map": [ [ - "intransitive" - ] - ], - [ - "_examples", + "_tags", + [ + "intransitive" + ] + ], [ - { - "text": "Vive en la casa roja.", - "english": "She lives in the red house." - }, - { - "text": "La pobrecita vive con dos hermanas crueles.", - "english": "The poor girl lives with two cruel sisters." - } + "_examples", + [ + { + "text": "Vive en la casa roja.", + "english": "She lives in the red house." + }, + { + "text": "La pobrecita vive con dos hermanas crueles.", + "english": "The poor girl lives with two cruel sisters." + } + ] ] ] - ] - } - ], - [ - "(transitive) to experience, to live through", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "(transitive) to experience, to live through", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "transitive" + ] + ], [ - "transitive" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/fa-en-lemmas.json b/data/test/tidy/fa-en-lemmas.json index 6748134..5a1015b 100644 --- a/data/test/tidy/fa-en-lemmas.json +++ b/data/test/tidy/fa-en-lemmas.json @@ -2,54 +2,56 @@ "ملک": { "molk": { "noun": { - "ipa": [ - { - "ipa": "[mulk]", - "tags": [ - "Classical-Persian", - "Hazaragi", - "Tajik", - "formal" - ] - }, - { - "ipa": "[mʊlk]", - "tags": [ - "Dari", - "formal", - "Kabuli" - ] - }, - { - "ipa": "[molkʲ]", - "tags": [ - "Iran", - "formal" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(Khorasan) a kind of pea", - { - "_type": "map", - "map": [ - [ - "_tags", + "5": { + "ipa": [ + { + "ipa": "[mulk]", + "tags": [ + "Classical-Persian", + "Hazaragi", + "Tajik", + "formal" + ] + }, + { + "ipa": "[mʊlk]", + "tags": [ + "Dari", + "formal", + "Kabuli" + ] + }, + { + "ipa": "[molkʲ]", + "tags": [ + "Iran", + "formal" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(Khorasan) a kind of pea", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "Khorasan" + ] + ], [ - "Khorasan" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -57,104 +59,106 @@ "فارْسی": { "fârsi": { "noun": { - "ipa": [ - { - "ipa": "[fɑːɾ.ˈsiː]", - "tags": [ - "Classical-Persian" - ] - }, - { - "ipa": "[fɑːɾ.síː]", - "tags": [ - "Dari", - "formal", - "Kabuli" - ] - }, - { - "ipa": "[fɔːɾ.sí]", - "tags": [ - "Hazaragi" - ] - }, - { - "ipa": "[fɒːɹ.síː]", - "tags": [ - "Iran", - "formal" - ] - }, - { - "ipa": "[fɔɾ.sí]", - "tags": [ - "Tajik", - "formal" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "Persian (the language of modern Iran, Afghanistan and Tajikistan, and widely spoken in Uzbekistan).", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "[fɑːɾ.ˈsiː]", + "tags": [ + "Classical-Persian" + ] + }, + { + "ipa": "[fɑːɾ.síː]", + "tags": [ + "Dari", + "formal", + "Kabuli" + ] + }, + { + "ipa": "[fɔːɾ.sí]", + "tags": [ + "Hazaragi" + ] + }, + { + "ipa": "[fɒːɹ.síː]", + "tags": [ + "Iran", + "formal" + ] + }, + { + "ipa": "[fɔɾ.sí]", + "tags": [ + "Tajik", + "formal" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "Persian (the language of modern Iran, Afghanistan and Tajikistan, and widely spoken in Uzbekistan).", + { + "_type": "map", + "map": [ [ - { - "text": "بَرادَرِ شُوْهَرِش فارْسی بَلَدِه.", - "english": "Her husband's brother knows Persian." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "بَرادَرِ شُوْهَرِش فارْسی بَلَدِه.", + "english": "Her husband's brother knows Persian." + } + ] ] ] - ] - } - ], - [ - "Persian (the language of Ancient Persia).", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "Persian (the language of Ancient Persia).", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "Persian, main ethnic group of Iran.", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "Persian, main ethnic group of Iran.", + { + "_type": "map", + "map": [ [ - { - "text": "فارْسی هَسْتیم.", - "english": "We are Persian." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "فارْسی هَسْتیم.", + "english": "We are Persian." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/fr-en-lemmas.json b/data/test/tidy/fr-en-lemmas.json index 67d7325..e0fb978 100644 --- a/data/test/tidy/fr-en-lemmas.json +++ b/data/test/tidy/fr-en-lemmas.json @@ -2,330 +2,332 @@ "prendre": { "prendre": { "verb": { - "ipa": [ - { - "ipa": "/pʁɑ̃dʁ/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(transitive) to take", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "/pʁɑ̃dʁ/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(transitive) to take", + { + "_type": "map", + "map": [ [ - { - "text": "prends ma main", - "english": "take my hand" - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "prends ma main", + "english": "take my hand" + } + ] ] ] - ] - } - ], - [ - "(transitive) to eat; to drink", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + } + ], + [ + "(transitive) to eat; to drink", + { + "_type": "map", + "map": [ [ - { - "text": "elle prend un café", - "english": "she is drinking a coffee" - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "elle prend un café", + "english": "she is drinking a coffee" + } + ] ] ] - ] - } - ], - [ - "(transitive) to get; to buy", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + } + ], + [ + "(transitive) to get; to buy", + { + "_type": "map", + "map": [ [ - { - "text": "Je vais prendre le plat du jour.", - "english": "I'll get the dish of the day." - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "Je vais prendre le plat du jour.", + "english": "I'll get the dish of the day." + } + ] ] ] - ] - } - ], - [ - "(transitive) to rob; to deprive", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + } + ], + [ + "(transitive) to rob; to deprive", + { + "_type": "map", + "map": [ [ - { - "text": "prendre quelque chose à quelqu’un", - "english": "to take something from someone" - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "prendre quelque chose à quelqu’un", + "english": "to take something from someone" + } + ] ] ] - ] - } - ], - [ - "(transitive) to make", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + } + ], + [ + "(transitive) to make", + { + "_type": "map", + "map": [ [ - { - "text": "prendre une décision", - "english": "to make a decision" - }, - { - "text": "prendre des mesures draconiennes", - "english": "to take draconian measures" - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "prendre une décision", + "english": "to make a decision" + }, + { + "text": "prendre des mesures draconiennes", + "english": "to take draconian measures" + } + ] ] ] - ] - } - ], - [ - "(intransitive) to catch, to work, to start", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "intransitive" - ] - ], - [ - "_examples", + } + ], + [ + "(intransitive) to catch, to work, to start", + { + "_type": "map", + "map": [ [ - { - "text": "le feu ne prend pas", - "english": "the fire won't start" - }, - { - "text": "la sauce ne prend pas", - "english": "the sauce isn't thickening" - } + "_tags", + [ + "intransitive" + ] + ], + [ + "_examples", + [ + { + "text": "le feu ne prend pas", + "english": "the fire won't start" + }, + { + "text": "la sauce ne prend pas", + "english": "the sauce isn't thickening" + } + ] ] ] - ] - } - ], - [ - "(reflexive) to get (something) caught (in), to jam", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "reflexive" - ] - ], - [ - "_examples", + } + ], + [ + "(reflexive) to get (something) caught (in), to jam", + { + "_type": "map", + "map": [ [ - { - "text": "je me suis pris la main dans la porte", - "english": "I caught my hand in the door" - }, - { - "text": "je me suis pris la porte dans la figure", - "english": "the door hit me in the face" - } + "_tags", + [ + "reflexive" + ] + ], + [ + "_examples", + [ + { + "text": "je me suis pris la main dans la porte", + "english": "I caught my hand in the door" + }, + { + "text": "je me suis pris la porte dans la figure", + "english": "the door hit me in the face" + } + ] ] ] - ] - } - ], - [ - "(transitive with à)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "in various idiomatic expressions", - "transitive", - "with à" - ] - ], - [ - "(transitive, in various idiomatic expressions) to start having a negative feeling towards someone", - { - "_type": "map", - "map": [ - [ - "_examples", - [ - { - "text": "Qu’est-ce qui t’a pris ? Qu’est-ce qui t’est passé par la tête ?", - "english": "What were you thinking? What got into you? What came over you?" - }, - { - "text": "Qu’est-ce qui lui a pris ? Quelle mouche l’a piqué ?", - "english": "What was he thinking? What got into him?" - } - ] - ] + } + ], + [ + "(transitive with à)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "in various idiomatic expressions", + "transitive", + "with à" ] - } - ] - ] - } - ], - [ - "(followed by a partitive, in various idiomatic expressions) to gain", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "followed by a partitive", - "in various idiomatic expressions" - ] - ], - [ - "_examples", + ], [ + "(transitive, in various idiomatic expressions) to start having a negative feeling towards someone", { - "text": "prendre de la vitesse", - "english": "to gain speed" - }, - { - "text": "prendre du galon", - "english": "to gain a promotion" + "_type": "map", + "map": [ + [ + "_examples", + [ + { + "text": "Qu’est-ce qui t’a pris ? Qu’est-ce qui t’est passé par la tête ?", + "english": "What were you thinking? What got into you? What came over you?" + }, + { + "text": "Qu’est-ce qui lui a pris ? Quelle mouche l’a piqué ?", + "english": "What was he thinking? What got into him?" + } + ] + ] + ] } ] ] - ] - } - ], - [ - "(colloquial; impersonal) to take (a certain amount of time)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "colloquial", - "impersonal" - ] - ], - [ - "_examples", + } + ], + [ + "(followed by a partitive, in various idiomatic expressions) to gain", + { + "_type": "map", + "map": [ [ - { - "text": "Ça va me prendre au moins deux heures pour le mettre à jour.", - "english": "It's going to take me at least two hours to update it." - } + "_tags", + [ + "followed by a partitive", + "in various idiomatic expressions" + ] + ], + [ + "_examples", + [ + { + "text": "prendre de la vitesse", + "english": "to gain speed" + }, + { + "text": "prendre du galon", + "english": "to gain a promotion" + } + ] ] ] - ] - } - ], - [ - "(colloquial; impersonal; by extension) to take (a certain number or amount of)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "broadly", - "colloquial", - "impersonal" - ] - ], - [ - "_examples", + } + ], + [ + "(colloquial; impersonal) to take (a certain amount of time)", + { + "_type": "map", + "map": [ [ - { - "text": "Pour finir dans deux heures, ça prend trois personnes.", - "english": "To finish in two hours, it'll take three people." - } + "_tags", + [ + "colloquial", + "impersonal" + ] + ], + [ + "_examples", + [ + { + "text": "Ça va me prendre au moins deux heures pour le mettre à jour.", + "english": "It's going to take me at least two hours to update it." + } + ] ] ] - ] - } - ], - [ - "(impersonal) to come over (to arise in and gain some control over one's thoughts and/or actions)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "impersonal" + } + ], + [ + "(colloquial; impersonal; by extension) to take (a certain number or amount of)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "broadly", + "colloquial", + "impersonal" + ] + ], + [ + "_examples", + [ + { + "text": "Pour finir dans deux heures, ça prend trois personnes.", + "english": "To finish in two hours, it'll take three people." + } + ] ] - ], - [ - "_examples", + ] + } + ], + [ + "(impersonal) to come over (to arise in and gain some control over one's thoughts and/or actions)", + { + "_type": "map", + "map": [ [ - { - "text": "il prend [quelque chose] à [quelqu’un]", - "english": "[something] comes over [someone]" - }, - { - "text": "Il lui prend une fantaisie de mettre le feu à la maison.", - "english": "A fancy comes over him to set fire to the house." - } + "_tags", + [ + "impersonal" + ] + ], + [ + "_examples", + [ + { + "text": "il prend [quelque chose] à [quelqu’un]", + "english": "[something] comes over [someone]" + }, + { + "text": "Il lui prend une fantaisie de mettre le feu à la maison.", + "english": "A fancy comes over him to set fire to the house." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -333,53 +335,55 @@ "sembler": { "sembler": { "verb": { - "ipa": [ - { - "ipa": "/sɑ̃.ble/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(intransitive, impersonal) to seem, to resemble", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "impersonal", - "intransitive" + "0": { + "ipa": [ + { + "ipa": "/sɑ̃.ble/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(intransitive, impersonal) to seem, to resemble", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "impersonal", + "intransitive" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(intransitive) to appear", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "intransitive" + } + ], + [ + "(intransitive) to appear", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "intransitive" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -387,78 +391,80 @@ "chambre": { "chambre": { "noun": { - "ipa": [ - { - "ipa": "/ʃɑ̃bʁ/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "a chamber in its various senses, including:", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "feminine" - ] - ], - [ - "a room.", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] + "0": { + "ipa": [ + { + "ipa": "/ʃɑ̃bʁ/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "a chamber in its various senses, including:", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "feminine" ] - } - ], - [ - "a hotel room.", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + ], + [ + "a room.", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "a bedroom.", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + } + ], + [ + "a hotel room.", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "a house of a parliament.", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + } + ], + [ + "a bedroom.", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } + } + ], + [ + "a house of a parliament.", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] + } + ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/fr-fr-lemmas.json b/data/test/tidy/fr-fr-lemmas.json index 2aced44..beee2a5 100644 --- a/data/test/tidy/fr-fr-lemmas.json +++ b/data/test/tidy/fr-fr-lemmas.json @@ -2,82 +2,84 @@ "avatar": { "avatar": { "noun": { - "ipa": [ - { - "ipa": "\\a.va.taʁ\\", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "Dans la religion hindouiste, chacune des incarnations du dieu Vishnou.", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "\\a.va.taʁ\\", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "Dans la religion hindouiste, chacune des incarnations du dieu Vishnou.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "Hindouisme" + ] + ], [ - "Hindouisme" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "Métamorphose, transformation d’un objet ou d’un individu qui en a déjà subi plusieurs.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "Métamorphose, transformation d’un objet ou d’un individu qui en a déjà subi plusieurs.", + { + "_type": "map", + "map": [ [ - "figuratively" - ] - ], - [ - "_examples", + "_tags", + [ + "figuratively" + ] + ], [ - { - "text": "Que d’avatars dans la vie politique de cet homme d’État !" - }, - { - "text": "Batman est l’avatar moderne de Zorro." - } + "_examples", + [ + { + "text": "Que d’avatars dans la vie politique de cet homme d’État !" + }, + { + "text": "Batman est l’avatar moderne de Zorro." + } + ] ] ] - ] - } - ], - [ - "Mésaventure, malheur.", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "Mésaventure, malheur.", + { + "_type": "map", + "map": [ [ - "broadly", - "Utilisé à tort" - ] - ], - [ - "_examples", + "_tags", + [ + "broadly", + "Utilisé à tort" + ] + ], [ - { - "text": "Le service social du travail – Avatars d’une fonction, vicissitudes d’un métier" - } + "_examples", + [ + { + "text": "Le service social du travail – Avatars d’une fonction, vicissitudes d’un métier" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/ja-en-lemmas.json b/data/test/tidy/ja-en-lemmas.json index 3e7952d..7e93704 100644 --- a/data/test/tidy/ja-en-lemmas.json +++ b/data/test/tidy/ja-en-lemmas.json @@ -2,32 +2,34 @@ "楽しい": { "たのしい": { "adj": { - "ipa": [ - { - "ipa": "[ta̠no̞ɕiː]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "pleasant, delightful, fun, enjoyable", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "[ta̠no̞ɕiː]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "pleasant, delightful, fun, enjoyable", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } + } + ] ] - ] + } } } } @@ -35,49 +37,51 @@ "好き": { "すき": { "adj": { - "ipa": [ - { - "ipa": "[sɨ̥kʲi]", - "tags": [] - }, - { - "ipa": "/su.ki/", - "tags": [] - }, - { - "ipa": "[sɯᵝ˦.ki˨]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "liked, favorite", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + "1": { + "ipa": [ + { + "ipa": "[sɨ̥kʲi]", + "tags": [] + }, + { + "ipa": "/su.ki/", + "tags": [] + }, + { + "ipa": "[sɯᵝ˦.ki˨]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "liked, favorite", + { + "_type": "map", + "map": [ [ - { - "text": "好きな食べ物は? アイスクリームです。", - "english": "What's your favorite food? - It's ice cream." - }, - { - "text": "君が好きだからこそこれほど頑張っているんだよ。", - "english": "It's precisely because I like you [because of my fondness for you] that I'm working this hard." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "好きな食べ物は? アイスクリームです。", + "english": "What's your favorite food? - It's ice cream." + }, + { + "text": "君が好きだからこそこれほど頑張っているんだよ。", + "english": "It's precisely because I like you [because of my fondness for you] that I'm working this hard." + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -85,124 +89,126 @@ "狸": { "たぬき": { "noun": { - "ipa": [ - { - "ipa": "[ta̠nɯ̟kʲi]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "a raccoon dog, Nyctereutes procyonoides", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + "1": { + "ipa": [ + { + "ipa": "[ta̠nɯ̟kʲi]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "a raccoon dog, Nyctereutes procyonoides", + { + "_type": "map", + "map": [ [ - { - "text": "アライグマなら尻尾にシマがある。どう見でもタヌキだ。", - "english": "If you're a raccoon, you'd have stripes on your tail. No matter how you look at it, you're a raccoon dog." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "アライグマなら尻尾にシマがある。どう見でもタヌキだ。", + "english": "If you're a raccoon, you'd have stripes on your tail. No matter how you look at it, you're a raccoon dog." + } + ] ] ] - ] - } - ], - [ - "(figurative) a person who pretends to be good but in fact is cunning (compare English sly fox)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "figuratively" - ] - ], - [ - "_examples", + } + ], + [ + "(figurative) a person who pretends to be good but in fact is cunning (compare English sly fox)", + { + "_type": "map", + "map": [ [ - { - "text": "やいやい、其処な狸め", - "english": "Hey there, you sly dog!" - } + "_tags", + [ + "figuratively" + ] + ], + [ + "_examples", + [ + { + "text": "やいやい、其処な狸め", + "english": "Hey there, you sly dog!" + } + ] ] ] - ] - } - ], - [ - "Short for 狸饂飩 (tanuki-udon) and 狸蕎麦 (tanuki-soba): styles of various noodle dishes", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "abbreviation", - "alt-of" + } + ], + [ + "Short for 狸饂飩 (tanuki-udon) and 狸蕎麦 (tanuki-soba): styles of various noodle dishes", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "abbreviation", + "alt-of" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(rare) Short for 狸寝入り (tanuki neiri): pretending to be asleep", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "abbreviation", - "alt-of", - "rare" - ] - ], - [ - "_examples", + } + ], + [ + "(rare) Short for 狸寝入り (tanuki neiri): pretending to be asleep", + { + "_type": "map", + "map": [ [ - { - "text": "狸を決め込む ― tanuki o kimekomu ― pretend to be a raccoon dog → feign sleep" - } + "_tags", + [ + "abbreviation", + "alt-of", + "rare" + ] + ], + [ + "_examples", + [ + { + "text": "狸を決め込む ― tanuki o kimekomu ― pretend to be a raccoon dog → feign sleep" + } + ] ] ] - ] - } - ], - [ - "(rare, obsolete) Short for 狸汁 (tanuki-jiru): a soup made from tanuki meat mixed with daikon, burdock root, etc.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "abbreviation", - "alt-of", - "obsolete", - "rare" + } + ], + [ + "(rare, obsolete) Short for 狸汁 (tanuki-jiru): a soup made from tanuki meat mixed with daikon, burdock root, etc.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "abbreviation", + "alt-of", + "obsolete", + "rare" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -210,288 +216,290 @@ "走る": { "はしる": { "verb": { - "ipa": [ - { - "ipa": "[ha̠ɕiɾɯ̟]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "to run (move fast on foot)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "to move forward; (of a machine) to operate, function; (of objects) to move at a high speed (of a vehicle)", - { - "_type": "map", - "map": [ - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "[ha̠ɕiɾɯ̟]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "to run (move fast on foot)", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "to move forward; (of a machine) to operate, function; (of objects) to move at a high speed (of a vehicle)", + { + "_type": "map", + "map": [ [ - { - "text": "車が走っている。", - "english": "A car is running. / Cars are running." - } + "_examples", + [ + { + "text": "車が走っている。", + "english": "A car is running. / Cars are running." + } + ] ] ] - ] - } - ], - [ - "to flow vigorously (of liquid)", - { - "_type": "map", - "map": [ - [ - "_examples", + } + ], + [ + "to flow vigorously (of liquid)", + { + "_type": "map", + "map": [ [ - { - "text": "石の上を水が走る。", - "english": "The water runs over the stones." - } + "_examples", + [ + { + "text": "石の上を水が走る。", + "english": "The water runs over the stones." + } + ] ] ] - ] - } - ], - [ - "_examples", - [ - { - "text": "マラソン選手が走り出した。", - "english": "Marathon athlete(s) started running." } + ], + [ + "_examples", + [ + { + "text": "マラソン選手が走り出した。", + "english": "Marathon athlete(s) started running." + } + ] ] ] - ] - } - ], - [ - "(transitive) to run through some kind of place", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "transitive" - ] - ], - [ - "_examples", + } + ], + [ + "(transitive) to run through some kind of place", + { + "_type": "map", + "map": [ [ - { - "text": "彼はこの道をよく走る。", - "english": "He often runs down this street." - } + "_tags", + [ + "transitive" + ] + ], + [ + "_examples", + [ + { + "text": "彼はこの道をよく走る。", + "english": "He often runs down this street." + } + ] ] ] - ] - } - ], - [ - "to move smoothly; to slide", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "to move smoothly; to slide", + { + "_type": "map", + "map": [ [ - { - "text": "刀が鞘から走る。", - "english": "The sword slides out of its sheath." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "刀が鞘から走る。", + "english": "The sword slides out of its sheath." + } + ] ] ] - ] - } - ], - [ - "to run away, escape", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "to run away, escape", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "to rush, hurry around", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "to rush, hurry around", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "to give over oneself to; to commit oneself to (usually something bad)", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "to give over oneself to; to commit oneself to (usually something bad)", + { + "_type": "map", + "map": [ [ - { - "text": "彼は敵に走った。", - "english": "He defected to the enemy." - }, - { - "text": "立場を忘れて感情に走ってはいけない。", - "english": "Don't forget your stance and give in to emotions." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "彼は敵に走った。", + "english": "He defected to the enemy." + }, + { + "text": "立場を忘れて感情に走ってはいけない。", + "english": "Don't forget your stance and give in to emotions." + } + ] ] ] - ] - } - ], - [ - "to spread out, scatter, splatter, spout", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "to spread out, scatter, splatter, spout", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "to lead or extend in a certain direction", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "to lead or extend in a certain direction", + { + "_type": "map", + "map": [ [ - { - "text": "山脈が南北に走る。\nSanmyaku ga nanboku ni hashiru.\nThe mountain range runs north–south." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "山脈が南北に走る。\nSanmyaku ga nanboku ni hashiru.\nThe mountain range runs north–south." + } + ] ] ] - ] - } - ], - [ - "to appear briefly; to flash", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", + } + ], + [ + "to appear briefly; to flash", + { + "_type": "map", + "map": [ [ - { - "text": "稲妻が走る", - "english": "lightning flashes by" - }, - { - "text": "背中に痛みが走った。", - "english": "I felt a brief pain in my back." - } + "_tags", + [] + ], + [ + "_examples", + [ + { + "text": "稲妻が走る", + "english": "lightning flashes by" + }, + { + "text": "背中に痛みが走った。", + "english": "I felt a brief pain in my back." + } + ] ] ] - ] - } - ], - [ - "(used with 胸(むね)が (mune ga)) to feel palpitations; to have a sense of unease", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "used with 胸(むね)が (mune ga)" + } + ], + [ + "(used with 胸(むね)が (mune ga)) to feel palpitations; to have a sense of unease", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "used with 胸(むね)が (mune ga)" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(euphemistic) to crack", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "euphemistic" + } + ], + [ + "(euphemistic) to crack", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "euphemistic" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(music) Alternative spelling of ハシる", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "alt-of", - "alternative" + } + ], + [ + "(music) Alternative spelling of ハシる", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "alt-of", + "alternative" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -499,103 +507,107 @@ "五色": { "ごしき": { "noun": { - "ipa": [ - { - "ipa": "[ɡo̞ɕikʲi]", - "tags": [] - }, - { - "ipa": "[ɡo̞ɕo̞kɯ̟]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "five colors (usu. red (赤), blue (青), yellow (黄), white (白) and black (黒))", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "[ɡo̞ɕikʲi]", + "tags": [] + }, + { + "ipa": "[ɡo̞ɕo̞kɯ̟]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "five colors (usu. red (赤), blue (青), yellow (黄), white (白) and black (黒))", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "melon, gourd", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "melon, gourd", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } + } + ] ] - ] + } } } }, "ごしょく": { "noun": { - "ipa": [ - { - "ipa": "[ɡo̞ɕikʲi]", - "tags": [] - }, - { - "ipa": "[ɡo̞ɕo̞kɯ̟]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "five colors (usu. red (赤), blue (青), yellow (黄), white (白) and black (黒))", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "[ɡo̞ɕikʲi]", + "tags": [] + }, + { + "ipa": "[ɡo̞ɕo̞kɯ̟]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "five colors (usu. red (赤), blue (青), yellow (黄), white (白) and black (黒))", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "melon, gourd", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + } + ], + [ + "melon, gourd", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } + } + ] ] - ] + } } } } @@ -603,32 +615,34 @@ "お腹が空いた": { "おなかがすいた": { "phrase": { - "ipa": [ - { - "ipa": "[o̞na̠ka̠ ɡa̠ sɨita̠]", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "[I am / someone is] hungry", - { - "_type": "map", - "map": [ - [ - "_tags", - [] - ], - [ - "_examples", - [] + "0": { + "ipa": [ + { + "ipa": "[o̞na̠ka̠ ɡa̠ sɨita̠]", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "[I am / someone is] hungry", + { + "_type": "map", + "map": [ + [ + "_tags", + [] + ], + [ + "_examples", + [] + ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/ko-en-lemmas.json b/data/test/tidy/ko-en-lemmas.json index cb7085b..f4916f6 100644 --- a/data/test/tidy/ko-en-lemmas.json +++ b/data/test/tidy/ko-en-lemmas.json @@ -2,37 +2,39 @@ "독일": { "독일": { "name": { - "ipa": [ - { - "ipa": "[to̞ɡiɭ]", - "tags": [ - "SK-Standard", - "Seoul" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "(South Korea) Germany (a country in Europe)", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "[to̞ɡiɭ]", + "tags": [ + "SK-Standard", + "Seoul" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "(South Korea) Germany (a country in Europe)", + { + "_type": "map", + "map": [ [ - "South-Korea" + "_tags", + [ + "South-Korea" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/la-en-lemmas.json b/data/test/tidy/la-en-lemmas.json index c964ab4..f2449a0 100644 --- a/data/test/tidy/la-en-lemmas.json +++ b/data/test/tidy/la-en-lemmas.json @@ -2,121 +2,123 @@ "fāma": { "fāma": { "noun": { - "ipa": [ - { - "ipa": "/ˈfaː.ma/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈfäːmä]", - "tags": [ - "Classical", - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "/ˈfa.ma/", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "fame", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1" - ] - ], - [ - "_examples", - [] - ] - ] - } - ], - [ - "rumour, talk, opinion, report", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1" - ] - ], - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "/ˈfaː.ma/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈfäːmä]", + "tags": [ + "Classical", + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "/ˈfa.ma/", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "fame", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1" + ] + ], [ - { - "text": "hascine propter rēs maledicās fāmās ferunt.", - "english": "Is it on account of these things that they spread slanderous reports?" - }, - { - "text": "“Oenōtrī coluēre virī; nunc fāma minōrēs", - "english": "“Oenotrian men tilled [the land]; now rumor [has it that their] descendants call the nation ‘Italy’ after the name of its leader, [Italus].”" - } + "_examples", + [] ] ] - ] - } - ], - [ - "reputation", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1" + } + ], + [ + "rumour, talk, opinion, report", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1" + ] + ], + [ + "_examples", + [ + { + "text": "hascine propter rēs maledicās fāmās ferunt.", + "english": "Is it on account of these things that they spread slanderous reports?" + }, + { + "text": "“Oenōtrī coluēre virī; nunc fāma minōrēs", + "english": "“Oenotrian men tilled [the land]; now rumor [has it that their] descendants call the nation ‘Italy’ after the name of its leader, [Italus].”" + } + ] ] - ], - [ - "_examples", - [ - { - "text": "Dīmīcantī dē fāmā dēesse.", - "english": "To abandon one whose reputation is attacked." - }, - { - "text": "Fāma tamen clāra est; et adhūc sine crīmine vīxī.", - "english": "My good name is nevertheless unstained; and so far I have lived without blame." - } + ] + } + ], + [ + "reputation", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1" + ] + ], + [ + "_examples", + [ + { + "text": "Dīmīcantī dē fāmā dēesse.", + "english": "To abandon one whose reputation is attacked." + }, + { + "text": "Fāma tamen clāra est; et adhūc sine crīmine vīxī.", + "english": "My good name is nevertheless unstained; and so far I have lived without blame." + } + ] ] ] - ] - } - ], - [ - "Fama, personified as a fast-moving, malicious goddess, the daughter of Terra. From the Greek φήμη, Pheme. Typically translated from the Latin as “Rumor.”", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1" + } + ], + [ + "Fama, personified as a fast-moving, malicious goddess, the daughter of Terra. From the Greek φήμη, Pheme. Typically translated from the Latin as “Rumor.”", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -124,172 +126,174 @@ "legō": { "legō": { "verb": { - "ipa": [ - { - "ipa": "/ˈle.ɡoː/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈɫ̪ɛɡoː]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "/ˈle.ɡo/", - "tags": [ - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "[ˈlɛːɡo]", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "to choose, select", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" + "1": { + "ipa": [ + { + "ipa": "/ˈle.ɡoː/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈɫ̪ɛɡoː]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "/ˈle.ɡo/", + "tags": [ + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "[ˈlɛːɡo]", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "to choose, select", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "to appoint", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" + } + ], + [ + "to appoint", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "to collect, gather, bring together", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" + } + ], + [ + "to collect, gather, bring together", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "to take out, pick out, extract, remove", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" + } + ], + [ + "to take out, pick out, extract, remove", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "to take to one's self unjustly, carry off, steal, purloin, plunder, abstract", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" + } + ], + [ + "to take to one's self unjustly, carry off, steal, purloin, plunder, abstract", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "to read", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "conjugation-3" - ] - ], - [ - "_examples", - [ - { - "text": "Librōs lege.", - "english": "Read books." - }, - { - "text": "Lēgistīne hunc librum?", - "english": "Have you read this book?" - } + } + ], + [ + "to read", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "conjugation-3" + ] + ], + [ + "_examples", + [ + { + "text": "Librōs lege.", + "english": "Read books." + }, + { + "text": "Lēgistīne hunc librum?", + "english": "Have you read this book?" + } + ] ] ] - ] - } - ], - [ - "(Medieval Latin) to teach, profess", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "Medieval-Latin", - "conjugation-3" + } + ], + [ + "(Medieval Latin) to teach, profess", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "Medieval-Latin", + "conjugation-3" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -297,54 +301,56 @@ "līlium": { "līlium": { "noun": { - "ipa": [ - { - "ipa": "/ˈliː.li.um/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈlʲiːlʲiʊ̃ˑ]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "/ˈli.li.um/", - "tags": [ - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "[ˈliːlium]", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "a lily", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2" + "0": { + "ipa": [ + { + "ipa": "/ˈliː.li.um/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈlʲiːlʲiʊ̃ˑ]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "/ˈli.li.um/", + "tags": [ + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "[ˈliːlium]", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "a lily", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -352,107 +358,109 @@ "ū̆sque": { "ū̆sque": { "adv": { - "ipa": [ - { - "ipa": "/ˈuːs.kʷe/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈuːs̠kʷɛ]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "/ˈus.kʷe/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈʊs̠kʷɛ]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "/ˈus.kwe/", - "tags": [ - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "[ˈuskwe]", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "all the way", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "not-comparable" + "0": { + "ipa": [ + { + "ipa": "/ˈuːs.kʷe/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈuːs̠kʷɛ]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "/ˈus.kʷe/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈʊs̠kʷɛ]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "/ˈus.kwe/", + "tags": [ + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "[ˈuskwe]", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "all the way", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "not-comparable" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "until, up to (sometimes with \"ad\")", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "not-comparable" + } + ], + [ + "until, up to (sometimes with \"ad\")", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "not-comparable" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "constantly, continuously", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "not-comparable" - ] - ], - [ - "_examples", - [ - { - "text": "ab ōvō ū̆sque ad māla", - "english": "from the beginning to the end\n(literally, “from the egg to the apples”)" - } + } + ], + [ + "constantly, continuously", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "not-comparable" + ] + ], + [ + "_examples", + [ + { + "text": "ab ōvō ū̆sque ad māla", + "english": "from the beginning to the end\n(literally, “from the egg to the apples”)" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -460,117 +468,119 @@ "rēctus": { "rēctus": { "verb": { - "ipa": [ - { - "ipa": "/ˈreːk.tus/", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈreːkt̪ʊs̠]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "/ˈrek.tus/", - "tags": [ - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "[ˈrɛkt̪us]", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "led straight along, drawn in a straight line, straight, upright.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1", - "declension-2", - "form-of", - "participle", - "passive", - "perfect" - ] - ], - [ - "_examples", - [ - { - "text": "Quae rectis lineis suos ordines servant", - "english": "Which preserve their order in straight lines" - } + "0": { + "ipa": [ + { + "ipa": "/ˈreːk.tus/", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈreːkt̪ʊs̠]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "/ˈrek.tus/", + "tags": [ + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "[ˈrɛkt̪us]", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "led straight along, drawn in a straight line, straight, upright.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1", + "declension-2", + "form-of", + "participle", + "passive", + "perfect" + ] + ], + [ + "_examples", + [ + { + "text": "Quae rectis lineis suos ordines servant", + "english": "Which preserve their order in straight lines" + } + ] ] ] - ] - } - ], - [ - "(in general) right, correct, proper, appropriate, befitting.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1", - "declension-2", - "form-of", - "participle", - "passive", - "perfect", - "usually" + } + ], + [ + "(in general) right, correct, proper, appropriate, befitting.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1", + "declension-2", + "form-of", + "participle", + "passive", + "perfect", + "usually" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "(in particular) morally right, correct, lawful, just, virtuous, noble, good, proper, honest.", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-1", - "declension-2", - "form-of", - "in particular", - "participle", - "passive", - "perfect" - ] - ], - [ - "_examples", - [ - { - "text": "Via stultī rēcta in oculīs eius; quī autem sapiēns est audit cōnsilia.", - "english": "The way of a fool is right in his own eyes: but he that is wise hearkeneth unto counsels. (Douay-Rheims trans., Challoner rev.: 1752 CE)" - } + } + ], + [ + "(in particular) morally right, correct, lawful, just, virtuous, noble, good, proper, honest.", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-1", + "declension-2", + "form-of", + "in particular", + "participle", + "passive", + "perfect" + ] + ], + [ + "_examples", + [ + { + "text": "Via stultī rēcta in oculīs eius; quī autem sapiēns est audit cōnsilia.", + "english": "The way of a fool is right in his own eyes: but he that is wise hearkeneth unto counsels. (Douay-Rheims trans., Challoner rev.: 1752 CE)" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } @@ -578,227 +588,229 @@ "domus": { "domus": { "noun": { - "ipa": [ - { - "ipa": "/ˈdo.mus/", - "tags": [ - "Classical", - "modern Italianate Ecclesiastical" - ] - }, - { - "ipa": "[ˈd̪ɔmʊs̠]", - "tags": [ - "Classical" - ] - }, - { - "ipa": "[ˈd̪ɔːmus]", - "tags": [ - "modern Italianate Ecclesiastical" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "house, home (the building where a person lives)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "irregular" - ] - ], - [ - "_examples", + "0": { + "ipa": [ + { + "ipa": "/ˈdo.mus/", + "tags": [ + "Classical", + "modern Italianate Ecclesiastical" + ] + }, + { + "ipa": "[ˈd̪ɔmʊs̠]", + "tags": [ + "Classical" + ] + }, + { + "ipa": "[ˈd̪ɔːmus]", + "tags": [ + "modern Italianate Ecclesiastical" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "house, home (the building where a person lives)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "irregular" + ] + ], + [ + "_examples", + [ + { + "text": "Deō domuīque", + "english": "For God and for home (motto of Methodist Ladies' College, Melbourne)" + }, + { + "text": "Stet fortūna domūs", + "english": "Let the good fortune of the house stand (motto of Harrow School, England)" + } + ] + ], [ + "a townhouse", { - "text": "Deō domuīque", - "english": "For God and for home (motto of Methodist Ladies' College, Melbourne)" - }, - { - "text": "Stet fortūna domūs", - "english": "Let the good fortune of the house stand (motto of Harrow School, England)" - } - ] - ], - [ - "a townhouse", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } - ] - ] - } - ], - [ - "any dwelling-place or abode (of people or animals)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "irregular" + } ] - ], - [ - "_examples", - [] ] - ] - } - ], - [ - "the place of one's birth or residence, native country, town", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "irregular" - ] - ], - [ - "_examples", - [] - ], - [ - "(also of the shell of invertebrates, tombs of the dead)", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] + } + ], + [ + "any dwelling-place or abode (of people or animals)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "irregular" ] - } - ] - ] - } - ], - [ - "household, family (the dependants of the head of a house)", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "irregular" + ], + [ + "_examples", + [] ] - ], - [ - "a group of disciples, school; an intellectual movement", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] + ] + } + ], + [ + "the place of one's birth or residence, native country, town", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "irregular" ] - } - ], - [ - "(monarchy) house, dynasty", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + ], + [ + "_examples", + [] + ], + [ + "(also of the shell of invertebrates, tombs of the dead)", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } - ] - ] - } - ], - [ - "(idiomatic) one's own possessions or resources", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "idiomatic", - "irregular" + } ] - ], - [ - "_examples", + ] + } + ], + [ + "household, family (the dependants of the head of a house)", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "irregular" + ] + ], [ + "a group of disciples, school; an intellectual movement", { - "text": "domum trahere", - "english": "to drag into one's pocket" - }, + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] + } + ], + [ + "(monarchy) house, dynasty", { - "text": "Domī versūra fit.", - "english": "One is one's own creditor. (proverb)" + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] } ] ] - ] - } - ], - [ - "(in locative case in phrases, idiomatic) peace", - { - "_type": "map", - "map": [ - [ - "_tags", - [ - "declension-2", - "declension-4", - "feminine", - "idiomatic", - "irregular", - "in locative case in phrases" + } + ], + [ + "(idiomatic) one's own possessions or resources", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "idiomatic", + "irregular" + ] + ], + [ + "_examples", + [ + { + "text": "domum trahere", + "english": "to drag into one's pocket" + }, + { + "text": "Domī versūra fit.", + "english": "One is one's own creditor. (proverb)" + } + ] ] - ], - [ - "_examples", - [ - { - "text": "ut non quietior populus domi esset quam militiae", - "english": "so that the people should not become lazier in the time of peace than that of war" - } + ] + } + ], + [ + "(in locative case in phrases, idiomatic) peace", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "declension-2", + "declension-4", + "feminine", + "idiomatic", + "irregular", + "in locative case in phrases" + ] + ], + [ + "_examples", + [ + { + "text": "ut non quietior populus domi esset quam militiae", + "english": "so that the people should not become lazier in the time of peace than that of war" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/sq-en-lemmas.json b/data/test/tidy/sq-en-lemmas.json index 1331bf2..b1d3f2f 100644 --- a/data/test/tidy/sq-en-lemmas.json +++ b/data/test/tidy/sq-en-lemmas.json @@ -2,34 +2,36 @@ "akull": { "akull": { "noun": { - "ipa": [ - { - "ipa": "/ˈakuɫ/", - "tags": [] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "ice", - { - "_type": "map", - "map": [ - [ - "_tags", + "1": { + "ipa": [ + { + "ipa": "/ˈakuɫ/", + "tags": [] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "ice", + { + "_type": "map", + "map": [ + [ + "_tags", + [ + "masculine" + ] + ], [ - "masculine" + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } @@ -37,210 +39,212 @@ "gjuhë": { "gjuhë": { "noun": { - "ipa": [ - { - "ipa": "/ˈɟuhə/", - "tags": [] - }, - { - "ipa": "[ˈɡjuː(h)]", - "tags": [ - "Gheg", - "Northern" - ] - }, - { - "ipa": "[ˈɡuː(h)]", - "tags": [ - "Gheg", - "Northern" - ] - }, - { - "ipa": "[ˈɡũː]", - "tags": [ - "Kosovo" - ] - }, - { - "ipa": "[ˈɡʎuhə]", - "tags": [ - "Arbëresh", - "Arvanitika" - ] - }, - { - "ipa": "[ˈɡʎuɣə]", - "tags": [ - "Calabria" - ] - } - ], - "glossTree": { - "_type": "map", - "map": [ - [ - "tongue (organ)", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [ + { + "ipa": "/ˈɟuhə/", + "tags": [] + }, + { + "ipa": "[ˈɡjuː(h)]", + "tags": [ + "Gheg", + "Northern" + ] + }, + { + "ipa": "[ˈɡuː(h)]", + "tags": [ + "Gheg", + "Northern" + ] + }, + { + "ipa": "[ˈɡũː]", + "tags": [ + "Kosovo" + ] + }, + { + "ipa": "[ˈɡʎuhə]", + "tags": [ + "Arbëresh", + "Arvanitika" + ] + }, + { + "ipa": "[ˈɡʎuɣə]", + "tags": [ + "Calabria" + ] + } + ], + "glossTree": { + "_type": "map", + "map": [ + [ + "tongue (organ)", + { + "_type": "map", + "map": [ [ - "feminine" - ] - ], - [ - "(figurative) speech, talking", - { - "_type": "map", - "map": [ - [ - "_examples", + "_tags", + [ + "feminine" + ] + ], + [ + "(figurative) speech, talking", + { + "_type": "map", + "map": [ [ - { - "text": "Mbaje gjuhën!", - "english": "Hold your tongue!" - }, - { - "text": "E ka gjuhën të gjatë.", - "english": "(literally, “She has a long tongue.”)" - } + "_examples", + [ + { + "text": "Mbaje gjuhën!", + "english": "Hold your tongue!" + }, + { + "text": "E ka gjuhën të gjatë.", + "english": "(literally, “She has a long tongue.”)" + } + ] ] ] - ] - } - ], - [ - "strip of land", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] - ] - } - ], - [ - "bell clapper, clanger, tongue", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] - ] - } - ], - [ - "_examples", + } + ], [ + "strip of land", { - "text": "gjuhë lope e zier", - "english": "boiled beef tongue" - }, + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] + } + ], + [ + "bell clapper, clanger, tongue", { - "text": "Dogji gjuhën.", - "english": "I burned my tongue." + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] } + ], + [ + "_examples", + [ + { + "text": "gjuhë lope e zier", + "english": "boiled beef tongue" + }, + { + "text": "Dogji gjuhën.", + "english": "I burned my tongue." + } + ] ] ] - ] - } - ], - [ - "language, tongue", - { - "_type": "map", - "map": [ - [ - "_tags", + } + ], + [ + "language, tongue", + { + "_type": "map", + "map": [ [ - "feminine" - ] - ], - [ - "register, speech, style", - { - "_type": "map", - "map": [ - [ - "_examples", + "_tags", + [ + "feminine" + ] + ], + [ + "register, speech, style", + { + "_type": "map", + "map": [ [ - { - "text": "gjuha e fëmijëve", - "english": "children speech" - }, - { - "text": "gjuhë e trashë", - "english": "foul language" - } + "_examples", + [ + { + "text": "gjuha e fëmijëve", + "english": "children speech" + }, + { + "text": "gjuhë e trashë", + "english": "foul language" + } + ] ] ] - ] - } - ], - [ - "language (generally, any form of communication)", - { - "_type": "map", - "map": [ - [ - "_examples", + } + ], + [ + "language (generally, any form of communication)", + { + "_type": "map", + "map": [ [ - { - "text": "gjuha e muzikës", - "english": "music's language" - }, - { - "text": "gjuha e bletëve", - "english": "bees' language" - } + "_examples", + [ + { + "text": "gjuha e muzikës", + "english": "music's language" + }, + { + "text": "gjuha e bletëve", + "english": "bees' language" + } + ] ] ] - ] - } - ], - [ - "(colloquial) local dialect", - { - "_type": "map", - "map": [ - [ - "_examples", - [] - ] - ] - } - ], - [ - "(colloquial) Albanian, as a subject in school", - { - "_type": "map", - "map": [ - [ - "_examples", - [] + } + ], + [ + "(colloquial) local dialect", + { + "_type": "map", + "map": [ + [ + "_examples", + [] + ] ] - ] - } - ], - [ - "_examples", + } + ], [ + "(colloquial) Albanian, as a subject in school", { - "text": "gjuha shqipe", - "english": "the Albanian language" + "_type": "map", + "map": [ + [ + "_examples", + [] + ] + ] } + ], + [ + "_examples", + [ + { + "text": "gjuha shqipe", + "english": "the Albanian language" + } + ] ] ] - ] - } + } + ] ] - ] + } } } } diff --git a/data/test/tidy/th-en-lemmas.json b/data/test/tidy/th-en-lemmas.json index 3064ba3..64f27ed 100644 --- a/data/test/tidy/th-en-lemmas.json +++ b/data/test/tidy/th-en-lemmas.json @@ -2,29 +2,31 @@ "็": { "็": { "character": { - "ipa": [], - "glossTree": { - "_type": "map", - "map": [ - [ - "It is a Thai symbol that is called Mai Taikhu (ไม้ไต่คู้). It is used to shorten the written form of the vowel เ-ะ to เ-็. The word that has the form initial consonant + เ ะ + end consonant will be shortened to เ-็X.\n", - { - "_type": "map", - "map": [ - [ - "_tags", + "0": { + "ipa": [], + "glossTree": { + "_type": "map", + "map": [ + [ + "It is a Thai symbol that is called Mai Taikhu (ไม้ไต่คู้). It is used to shorten the written form of the vowel เ-ะ to เ-็. The word that has the form initial consonant + เ ะ + end consonant will be shortened to เ-็X.\n", + { + "_type": "map", + "map": [ [ - "letter" + "_tags", + [ + "letter" + ] + ], + [ + "_examples", + [] ] - ], - [ - "_examples", - [] ] - ] - } + } + ] ] - ] + } } } } diff --git a/types.ts b/types.ts index 7036e3f..8d0f0d1 100644 --- a/types.ts +++ b/types.ts @@ -16,6 +16,7 @@ declare global { head_templates?: HeadTemplate[]; word?: string; pos?: string; + etymology_number?: number; sounds?: Sound[]; forms?: FormInfo[]; senses?: KaikkiSense[]; @@ -80,7 +81,9 @@ declare global { type LemmaDict = { [word: string]: { [reading: string]: { - [pos: string]: LemmaInfo + [pos: string]: { + [etymology_number: string]: LemmaInfo + } } } }