fix(curator): contractions are words of their own

Wiktionary tags a contraction as an abbreviation and an alternative of
its first word (im: in + dem), so German's im, zum and ins, which every
subtitle has, were neither entries nor found as forms. A contraction is
now an entry of its own, as text writes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-14 08:02:54 +02:00
commit 8f4131a138
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -140,6 +140,8 @@ void main() {
(essen['textKeys']! as List).cast<String>(),
containsAll(['isst', 'aß', 'gegessen']),
);
// A contraction is a word of its own: im, of in and dem.
expect(ids, contains('im/contraction'));
// Typed with `ss`.
expect(
(entryOf('wiktionary-de-en.jsonl.gz', 'Straße/noun')['looseKeys']!
@ -246,8 +248,14 @@ void main() {
for (final line in linesOf('wiktionary-de-en.jsonl.gz').skip(1))
(line['headword'], line['rank']! as int, line['labels']),
]..sort((a, b) => a.$2.compareTo(b.$2));
expect(ranked.first.$1, 'Haus');
expect(ranked.first.$3, ['common']);
expect(
[
for (final (word, _, _) in ranked)
if (['im', 'Haus', 'Straße'].contains(word)) word,
],
['im', 'Haus', 'Straße'],
);
expect(ranked.firstWhere((each) => each.$1 == 'Haus').$3, ['common']);
});
group('folding', () {