A Python library for handling inter-linear-glossed text.
Project description
pyigt: Handling interlinear glossed text with Python
This library provides easy access to Interlinear Glossed Text (IGT) according to the Leipzig Glossing Rules, stored as CLDF examples.
Installation
Installing pyigt
via pip
pip install pyigt
will install the Python package along with a command line interface igt
.
Usage
CLI
$ igt -h
usage: igt [-h] [--log-level LOG_LEVEL] COMMAND ...
optional arguments:
-h, --help show this help message and exit
--log-level LOG_LEVEL
log level [ERROR|WARN|INFO|DEBUG] (default: 20)
available commands:
Run "COMAMND -h" to get help for a specific command.
COMMAND
ls List IGTs in a CLDF dataset
stats Describe the IGTs in a CLDF dataset
Python API
>>> from pyigt import Corpus
>>> corpus = Corpus.from_path('tests/fixtures/cldf-metadata.json')
>>> len(corpus)
>>> len(corpus)
5
>>> for igt in corpus:
... print(igt)
... break
...
zəple: ȵike: peji qeʴlotʂuʁɑ,
zəp-le: ȵi-ke: pe-ji qeʴlotʂu-ʁɑ,
earth-DEF:CL WH-INDEF:CL become-CSM in.the.past-LOC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyigt-0.2.0.tar.gz
(21.3 kB
view hashes)
Built Distribution
pyigt-0.2.0-py2.py3-none-any.whl
(21.8 kB
view hashes)
Close
Hashes for pyigt-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbf5bf68dc48925157d977fdcc820686e9b9143b065ebdfd15eb9e6cf113a21e |
|
MD5 | c3d71c535a8767d0705cebc15dd48273 |
|
BLAKE2b-256 | 05f6eef1d3e843df7e172bbf33bf4452330d3b5990dabef4174bcf4ac80f2bf1 |