A program for creating a searchable local language dictionary based (mainly) on extracted wiktionary data. Allows users to collect definitions which can be exported as a machine readable flashcard file. Currently supports Latin, Ancient Greek and Old English.
This module processes extracted wiktionary data files which can be found at kaikki.org
- https://kaikki.org/dictionary/Latin/
- https://kaikki.org/dictionary/Ancient%20Greek/index.html
- https://kaikki.org/dictionary/Old%20English/index.html
See https://github.com/tatuylonen/wiktextract
The module looks for the files in a subfolder of main directory containing the source files: "kaikki_json_files".
The module organizes the data into a standard data structure used in this program.
Definitions are made of standard python data structures.
Definitions: { "heading": unicode string of the word as spelled in its original alphabet, "handle": heading converted to asci, "entries":[list of entry objects, see below], "tags":[list of identifying tag strings], "roots": heading of a root/lemma if the definition is not itself a root }
Entries: { "partOfSpeech": string "verb", "noun" etc., "principleParts": string representing principle parts, "simpleParts": simplified version of principle parts supported for Latin, "senses": [list of word 'sense' objects, typically displayed as an ordered list], "etymology": string containing etymology information }
Senses: { "gloss": string containing a word sense you would find in a single line of a definition in a typical dictionary, "tags": [tags related to a specific word sense such as "Pre-classical" or "transitive"] }
These modules are called when the language is set to Ancient Greek. They use machine readable files of two important Greek lexicon's: the Middle Liddel and Liddel-Scott-Jones (LSJ). The data files can be found here:
- https://github.com/gcelano/LSJ_GreekUnicode/blob/master/grc.lsj.perseus-eng6.xml
- https://github.com/blinskey/middle-liddell
These files were originally made available by the Tufts University Perseus Digital Library.
This module is called when the language is set to Old English. It uses a text file containing Mary Lynch Johnson's A Modern English - Old English Dictionary.
Called when the language is set to Latin. Changes the top line of most definitions to a simple string containing the 'principle parts' for verbs, nouns and adjectives. Other parts of speech are unchanged.
Organize parsed definitions into a datrie and saves data to a local file.
Utility functions for creating personal dictionary files or "word hoards".
This is the principle module for interacting with datrie files. Contains functions for loading trie objects, searching and saving definitions to word hoards.
Contain functions for editing and displaying word definitions and entries respectively.
Allows users to export a word hoard to a text file containing separator characters and html tags. The support is currently built around the file import tool in the Anki flashcard program. https://apps.ankiweb.net/
Contains the functions for printing formatted flashcards to a file.
This is an entire functionally separate part of the program. It fetches pages from wiktionary.org and parses the html text to find the morphology tables for Latin, Greek and Old English words. Supports nouns, verbs and adjectives in all three languages. The algorithms are quite involved and are not compatible across languages. The word forms are organized into nested dictionaries and saved into a template file. The template files can be used to created flashcards with various configurations.
Example: Front: present tense of verb "x", Back: Table showing present tense forms.
These modules support the morphology table functionality.