- Notifications
You must be signed in to change notification settings - Fork19
A Python module to discover the etymology of words
License
jmsv/ety-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
@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'sEtymological 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.
pip install ety
>>>importety>>>ety.origins("potato")[Word(batata,language=Taino)]>>>ety.origins("drink",recursive=True)[Word(drync,language=OldEnglish (ca.450-1100)),Word(drinken,language=MiddleEnglish (1100-1500)),Word(drincan,language=OldEnglish (ca.450-1100))]>>>print(ety.tree("aerodynamically"))aerodynamically (English)├──-ally (English)└──aerodynamic (English) ├──aero- (English) │ └──ἀήρ (AncientGreek (to1453)) └──dynamic (English) └──dynamique (French) └──δυναμικός (AncientGreek (to1453)) └──δύναμις (AncientGreek (to1453)) └──δύναμαι (AncientGreek (to1453))
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$ ety drinkdrink# List direct origins • drync (Old English (ca. 450-1100)) • drinken (Middle English (1100-1500))$ ety drink -r# Recursive searchdrink • drync (Old English (ca. 450-1100)) • drinken (Middle English (1100-1500)) • drincan (Old English (ca. 450-1100))$ ety drink -t# Etymology treedrink (English)├── drinken (Middle English (1100-1500))│ └── drincan (Old English (ca. 450-1100))└── drync (Old English (ca. 450-1100))
In a virtual environment -Pipenv is recommended:
python setup.py install
About
A Python module to discover the etymology of words
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.
