Skip to main content

ety

PyPI version Python versions Wheel Support Documentation Status
Build Status Code style: black


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

Metadata

Release files for ety 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ety 1.4.0
File Size Uploaded
ety-1.4.0.tar.gz 2.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ety 1.4.0
File Interpreter ABI Platform
ety-1.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 5.2 MB

Release files / ety-1.4.0.tar.gz

Download URL ety-1.4.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
72cf7101c98e8b5849620e2d8f09fdb1d2f5255274880bf67c0cf258c2e7acb7
BLAKE2b-256 checksum
How to use checksums
c0d602f354e520253da4ebd253b801ca432e10ee93f39c85248248d62353c8f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / ety-1.4.0-py2.py3-none-any.whl

Download URL ety-1.4.0-py2.py3-none-any.whl
Size 2.6 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7b4104db063ecdfdc95353a2656863506df9ec36ca0150a0cd346baaf7988435
BLAKE2b-256 checksum
How to use checksums
4ab4975db4c0ff58aa9127d1507fc6557c149086764b3a9017503a6b50a43285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

3 release files

1.0.2

2 release files

1.0.1

3 release files

1.0.0

4 release files

0.2.0

2 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page