Intro
@jmsv and @parker57 started a side project to analyse etymologies of text written by various historical authors, expecting there to already be a library for retrieving etymological data. On discovering that this wasn't the case, ety was created!
There isn't a single source of truth for etymologies; words' origins can be heavily disputed. This package's source data, Gerard de Melo's Etymological Wordnet, is mostly mined from Wiktionary. Since this is a collaboratively edited dictionary, its data could be seen as the closest we can get to a public consensus.
Install
pip
pip install ety
Usage
Module
>>> import ety
>>> ety.origins("potato")
[Word(batata, language=Taino)]
>>> ety.origins("drink", recursive=True)
[Word(drync, language=Old English (ca. 450-1100)), Word(drinken, language=Middle English (1100-1500)), Word(drincan, language=Old English (ca. 450-1100))]
>>> print(ety.tree("aerodynamically"))
aerodynamically (English)
âââ -ally (English)
âââ aerodynamic (English)
âââ aero- (English)
â âââ áŒÎźÏ (Ancient Greek (to 1453))
âââ dynamic (English)
âââ dynamique (French)
âââ ÎŽÏ
ΜαΌÎčÎșÏÏ (Ancient Greek (to 1453))
âââ ÎŽÏΜαΌÎčÏ (Ancient Greek (to 1453))
âââ ÎŽÏΜαΌαÎč (Ancient Greek (to 1453))
CLI
After installing, a command-line tool is also available. ety -h
outputs the following help text describing arguments:
usage: ety [-h] [-r] [-t] words [words ...]
positional arguments:
words the search word(s)
optional arguments:
-h, --help show this help message and exit
-r, --recursive search origins recursively
-t, --tree display etymology tree
Examples
$ ety drink
drink # List direct origins
âą drync (Old English (ca. 450-1100))
âą drinken (Middle English (1100-1500))
$ ety drink -r # Recursive search
drink
âą drync (Old English (ca. 450-1100))
âą drinken (Middle English (1100-1500))
âą drincan (Old English (ca. 450-1100))
$ ety drink -t # Etymology tree
drink (English)
âââ drinken (Middle English (1100-1500))
â âââ drincan (Old English (ca. 450-1100))
âââ drync (Old English (ca. 450-1100))
Development
In a virtual environment - Pipenv is recommended:
python setup.py install