Add Microsoft terminology, MOE dictionary, and unified search - #1
Open
voidful wants to merge 1 commit into
Open
Conversation
…arch Inspired by termic (https://github.com/spidersouris/termic), this adds multi-source terminology lookup and significantly expands the vocabulary database for Taiwan Chinese localization. New scripts: - fetch-microsoft-terms.py: query Microsoft Glossary + Translation Memory for EN↔zh_TW via termic.me (POS, definitions, product context) - enrich-from-moedict.py: enrich vocabulary with MOE Dictionary data (bopomofo, definitions, examples) via g0v/moedict-data - search.py: unified search across all local + online sources (exact, fuzzy, regex modes) Data expansion: - Linguipedia cross-strait: 47 → 1,400 entries (17 subcategories) - New enriched vocabulary: 421 daily-use terms with 注音 and MOE definitions covering food, transport, daily items, clothing, housing, etc. Improved fetch-linguipedia.py: - User-Agent header fix for 403 errors - Partial save on error with --start-page resume - --merge-cache for combining partial fetches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inspired by termic and g0v/moedict-data, this PR significantly expands terminology lookup capabilities and vocabulary coverage:
fetch-microsoft-terms.pyqueries termic.me for Microsoft Glossary + Translation Memory (EN↔zh_TW), with POS, definitions, product context, reverse search, and batch modeenrich-from-moedict.pyenriches vocabulary with 教育部重編國語辭典修訂本 data (注音, authoritative definitions, usage examples) via g0v/moedict-datasearch.pysearches all local vocabularies + online Microsoft terminology in one command (exact/fuzzy/regex)--start-pageresume,--merge-cacheUsage examples
Test plan
search.pyreturns results from vocabulary.md, linguipedia, and moedict-enriched sourcesfetch-microsoft-terms.pyreturns glossary + translation memory results from termic.meenrich-from-moedict.py --lookupdisplays 注音, definitions, and examplesenrich-from-moedict.py --generateproduces vocabulary-enriched.md (421 entries)fetch-linguipedia.pyfetches with User-Agent fix and saves partial results on error