From 166d3bde50718eacd51c75cb82246988d9ec0151 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 28 Apr 2026 18:07:00 -0500 Subject: chore: capture Wiktionary REST fixtures for replay Save raw response bodies from the Wiktionary REST endpoint under tests/fixtures/. The fetch layer can replay them with a cl-letf on url-retrieve-synchronously instead of hitting the network in tests. The five fixtures cover the cases that matter for the parser. anaphora is the simple single-sense English entry. SBIR is an acronym with multiple senses. API is highly polysemous and multi-language (en, fr, id, la, pt). hapax-legomenon is the multi-word case, so it exercises URL-encoding for the space. The 404 fixture captures the JSON error body Wiktionary returns when a term isn't there. --- tests/fixtures/wiktionary-404.json | 1 + tests/fixtures/wiktionary-API.json | 1 + tests/fixtures/wiktionary-SBIR.json | 1 + tests/fixtures/wiktionary-anaphora.json | 1 + tests/fixtures/wiktionary-hapax-legomenon.json | 1 + 5 files changed, 5 insertions(+) create mode 100644 tests/fixtures/wiktionary-404.json create mode 100644 tests/fixtures/wiktionary-API.json create mode 100644 tests/fixtures/wiktionary-SBIR.json create mode 100644 tests/fixtures/wiktionary-anaphora.json create mode 100644 tests/fixtures/wiktionary-hapax-legomenon.json diff --git a/tests/fixtures/wiktionary-404.json b/tests/fixtures/wiktionary-404.json new file mode 100644 index 0000000..3b52c5c --- /dev/null +++ b/tests/fixtures/wiktionary-404.json @@ -0,0 +1 @@ +{"status":404,"type":"Internal error"} \ No newline at end of file diff --git a/tests/fixtures/wiktionary-API.json b/tests/fixtures/wiktionary-API.json new file mode 100644 index 0000000..7e71e45 --- /dev/null +++ b/tests/fixtures/wiktionary-API.json @@ -0,0 +1 @@ +{"en":[{"partOfSpeech":"Noun","language":"English","definitions":[{"definition":""},{"definition":" Initialism of active pharmaceutical ingredient."},{"definition":""},{"definition":" Initialism of application programming interface."},{"definition":"Initialism of Asian and Pacific Islander."},{"definition":" Initialism of advanced primer ignition."},{"definition":" Initialism of armor-piercing incendiary."}]},{"partOfSpeech":"Proper noun","language":"English","definitions":[{"definition":"Initialism of American Petroleum Institute."},{"definition":" Initialism of Additional Protocol I of 1977 to the four Geneva Conventions."}]}],"fr":[{"partOfSpeech":"Proper noun","language":"French","definitions":[{"definition":"initialism of alphabet phonétique international: IPA (International Phonetic Alphabet)"}]},{"partOfSpeech":"Noun","language":"French","definitions":[{"definition":"API, application programming interface"}]},{"partOfSpeech":"Noun","language":"French","definitions":[{"definition":"initialism of automate programmable industriel (programmable logic controller), PLC"}]}],"id":[{"partOfSpeech":"Proper noun","language":"Indonesian","definitions":[{"definition":"initialism of Akademi Penerbang Indonesia"}]},{"partOfSpeech":"Noun","language":"Indonesian","definitions":[{"definition":"initialism of alat penangkapan ikan"},{"definition":" Initialism of application programming interface."},{"definition":" initialism of Anugerah Pesona Indonesia"},{"definition":" initialism of angka pengenal importir"}]}],"la":[{"partOfSpeech":"Proper noun","language":"Latin","definitions":[{"definition":"initialism of Alphabētum Phōnēticum Internātiōnāle (International Phonetic Alphabet (IPA))"}]}],"pt":[{"partOfSpeech":"Noun","language":"Portuguese","definitions":[{"definition":" API (application programming interface)"}]}]} \ No newline at end of file diff --git a/tests/fixtures/wiktionary-SBIR.json b/tests/fixtures/wiktionary-SBIR.json new file mode 100644 index 0000000..f7b0ae4 --- /dev/null +++ b/tests/fixtures/wiktionary-SBIR.json @@ -0,0 +1 @@ +{"en":[{"partOfSpeech":"Proper noun","language":"English","definitions":[{"definition":""},{"definition":" Initialism of Small Business Innovation Research (type of program).","parsedExamples":[{"example":"The funding mechanism will be SBIR."}],"examples":["The funding mechanism will be SBIR."]}]},{"partOfSpeech":"Noun","language":"English","definitions":[{"definition":" Initialism of small business innovation research (project), a single project executed by any program of the eponymous type of program.","parsedExamples":[{"example":"They are working on an interesting SBIR."}],"examples":["They are working on an interesting SBIR."]}]}]} \ No newline at end of file diff --git a/tests/fixtures/wiktionary-anaphora.json b/tests/fixtures/wiktionary-anaphora.json new file mode 100644 index 0000000..1c57068 --- /dev/null +++ b/tests/fixtures/wiktionary-anaphora.json @@ -0,0 +1 @@ +{"en":[{"partOfSpeech":"Noun","language":"English","definitions":[{"definition":""},{"definition":" The repetition of a phrase at the beginning of phrases, sentences, or verses, used for emphasis."},{"definition":""},{"definition":" An expression that refers to a preceding expression."},{"definition":""},{"definition":" The most solemn part of the Divine Liturgy or the Mass during which the offerings of bread and wine are consecrated as body and blood of Christ."}]},{"partOfSpeech":"Noun","language":"English","definitions":[{"definition":"plural of anaphor"}]}]} \ No newline at end of file diff --git a/tests/fixtures/wiktionary-hapax-legomenon.json b/tests/fixtures/wiktionary-hapax-legomenon.json new file mode 100644 index 0000000..3cb0a02 --- /dev/null +++ b/tests/fixtures/wiktionary-hapax-legomenon.json @@ -0,0 +1 @@ +{"en":[{"partOfSpeech":"Noun","language":"English","definitions":[{"definition":" A word occurring only once in a given corpus."}]}],"de":[{"partOfSpeech":"Noun","language":"German","definitions":[{"definition":"alternative letter-case form of Hapax Legomenon"}]}],"hu":[{"partOfSpeech":"Noun","language":"Hungarian","definitions":[{"definition":"hapax legomenon"}]}],"es":[{"partOfSpeech":"Noun","language":"Spanish","definitions":[{"definition":"alternative form of hápax legómenon"}]}]} \ No newline at end of file -- cgit v1.2.3