├── requirements.txt ├── README.md └── reader.py /requirements.txt: -------------------------------------------------------------------------------- 1 | pyyaml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cltk_non_zoega_dictionary 2 | 3 | Geir Tómasson Zoëga's *A Concise Dictionary of Old Icelandic*. 4 | 5 | Dictionary comes from https://github.com/clemsciences/old_norse_dictionary_zoega/. -------------------------------------------------------------------------------- /reader.py: -------------------------------------------------------------------------------- 1 | import os 2 | import yaml 3 | 4 | PACKDIR = os.path.abspath(os.path.dirname(__file__)) 5 | 6 | 7 | def read_yaml(): 8 | """ 9 | >>> read_yaml()["sonr"] 10 | '(gen. sonar, dat. syni and søni; pl. synir, sønir; ace. sonu and syni), m. son.' 11 | 12 | """ 13 | with open(os.path.join(PACKDIR, "dictionary.yaml"), "r", encoding="utf-8") as f: 14 | return yaml.load(f, Loader=yaml.CLoader) 15 | --------------------------------------------------------------------------------