feat(dictionary): characters of Chinese, Korean and Greek, written by hand; pinyin typed

Parity with Japanese's kanji and kana:

- The characters' tab is named by its language (Hanzi, Hangul & Hanja,
  Alphabet), its groups too: HSK levels and the characters in common use
  (Hong Kong's grades for traditional ones); Hangul and the Hanja taught
  in schools; Greek's letters. Radicals for Chinese and Korean in their
  own forms (讠 for 言 in simplified Chinese), none for Greek.
- A character's readings are named as its language names them: On and
  Kun, Pinyin, Eum and Hun (음, 훈); a letter means its sound and name.
- How characters are written comes by language: Chinese from Make Me a
  Hanzi (its medians in KanjiVG's square, Arphic Public License, a data
  file beside the app, never in cards), the Hangul letters drawn by the
  curator; a Korean word is written letter by letter (닭: ㄷ ㅏ ㄺ). Words
  of alphabets (German, Greek) aren't written by hand.
- A Chinese word's pinyin is typed in a session, tone numbers turning
  into marks (ni3 → nǐ); KRDict's levels (초급, 중급, 고급) tag Korean
  words; a Korean word's pronunciation shows in brackets ([가치]).
- Smaller: Look up in the composer keeps a noun's article; the Watch
  filter names its level list; hints and placeholders by language.

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 12:35:17 +02:00
commit 5479b973fc
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -61,6 +61,82 @@ const wiktionaryDe = Dictionary(
entryCount: 4,
);
/// Chinese words of CC-CEDICT in simplified characters.
const ccCedictHans = Dictionary(
source: 'cc-cedict-hans',
sourceVersion: '2026-10-14',
kind: DictionaryKind.words,
language: 'zh-Hans',
glossLanguage: 'en',
license: 'CC-BY-SA-4.0',
credits: [
(
name: 'CC-CEDICT',
by: 'MDBG',
license: 'CC-BY-SA-4.0',
url: 'https://www.mdbg.net/chinese/dictionary?page=cc-cedict',
),
],
entryCount: 0,
);
/// Chinese characters of Unihan in simplified writing.
const unihanHans = Dictionary(
source: 'unihan-hans',
sourceVersion: '18.0.0',
kind: DictionaryKind.characters,
language: 'zh-Hans',
glossLanguage: 'en',
license: 'Unicode-3.0',
credits: [
(
name: 'Unihan Database',
by: 'Unicode, Inc.',
license: 'Unicode-3.0',
url: 'https://www.unicode.org/reports/tr38/',
),
],
entryCount: 1,
);
/// Greek words with English meanings from Wiktionary.
const wiktionaryEl = Dictionary(
source: 'wiktionary-el',
sourceVersion: '2026-10-03',
kind: DictionaryKind.words,
language: 'el',
glossLanguage: 'en',
license: 'CC-BY-SA-4.0',
credits: [
(
name: 'Wiktionary',
by: 'Wiktionary contributors',
license: 'CC-BY-SA-4.0',
url: 'https://en.wiktionary.org/wiki/Wiktionary:Copyrights',
),
],
entryCount: 0,
);
/// The Greek alphabet the curator writes.
const greekAlphabet = Dictionary(
source: 'greek-alphabet',
sourceVersion: '1',
kind: DictionaryKind.characters,
language: 'el',
glossLanguage: 'en',
license: 'CC0-1.0',
credits: [
(
name: 'Alphabets (Hangul, Greek)',
by: 'Halkyon Learn contributors',
license: 'CC0-1.0',
url: 'https://code.halkyon.app/project-halkyon/halkyon_learn',
),
],
entryCount: 1,
);
/// A German word of Wiktionary: [headword], its part of speech [pos] in
/// full, meaning [glosses], its [genders] and the [forms] that find it.
DictionaryWord germanWord(
@ -104,7 +180,8 @@ DictionaryWord word(
);
/// A KANJIDIC2 character: [headword] meaning [meanings], read [on] and
/// [kun], with [labels]; a kana with its [romaji].
/// [kun], with [labels]; a kana with its [romaji]; or a character [of]
/// another dictionary of characters.
DictionaryCharacter character(
String headword, {
List<String> meanings = const [],
@ -112,11 +189,15 @@ DictionaryCharacter character(
List<String> kun = const [],
List<String> labels = const [],
String? romaji,
String? name,
int? grade,
int? strokes,
String? version,
Dictionary of = kanjidic,
}) => DictionaryCharacter(
ref: (source: 'kanjidic', id: headword),
ref: (source: of.source, id: headword),
name: name,
language: of.language,
headword: headword,
labels: labels,
meanings: meanings,