Skip to content

Instantly share code, notes, and snippets.

@Khouderchah-Alex
Khouderchah-Alex / chinese_word_selector.py
Created January 21, 2019 20:18
Script to add Chinese words from an input list to a word file when all the characters in that word are known.
"""Script to add Chinese words from the input list to the word file when all the
characters in that word are known (i.e. exist in the character file).
The input list is currently assumed to be the output from the ArchChinese-Scraper
Chrome extension (see https://github.com/Khouderchah-Alex/ArchChinese-Scraper).
Note that in the current form, the character file must contain both traditional
and simplified characters. If one is only studying traditional or simplified
characters, the word_regex variable can be modified such the word capture group