Metadata-Version: 2.5
Name: eldpy
Version: 0.2.0
Summary: Glossed examples from ELAN and FLEx files of endangered-language documentation, as CLDF rows, CSV and LaTeX (langsci-gb4e)
Project-URL: Homepage, https://github.com/ZAS-QUEST/eldpy
Project-URL: Bug Tracker, https://github.com/ZAS-QUEST/eldpy/issues
Author-email: Sebastian Nordhoff <sebastian.nordhoff@glottotopia.de>
License-Expression: MIT
License-File: LICENSE
Keywords: CLDF,ELAN,FLEx,endangered languages,interlinear glossed text,linguistics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.11
Requires-Dist: langsci[elan,flex]<0.2,>=0.1.0
Description-Content-Type: text/markdown

# eldpy

Glossed examples from ELAN (`.eaf`) and FLEx (`.flextext`) files of language documentation: the sentences with their words, glosses and
translation, as the rows of a CLDF `examples.csv`, as CSV, or as LaTeX for `langsci-gb4e`.

```sh
pip install eldpy            # installs langsci[elan,flex]: lxml, langdetect
eaf2cldf text.eaf --out out/ --latex examples      # the commands come with langsci
flex2cldf texts.flextext --out out/
```

```python
from eldpy import ElanFile, to_csv, to_tex

eaf = ElanFile("text.eaf")
eaf.populate(major_languages=("en",))     # the language(s) of the translation tier
rows = eaf.examples()
open("examples.csv", "w", encoding="utf-8").write(to_csv(rows))
open("examples.tex", "w", encoding="utf-8").write(to_tex(rows, output_type="examples"))
```

Python 3.11 or newer. The documentation of the options (tier types, sentence tier, sentences without glosses, languages) is in the
user guide of `langsci`.

## Relation to langsci and to eldpy 0.0.x

Version 0.2 is a new start. The code is part of [`langsci`](https://pypi.org/project/langsci/) (Language Science Press): `langsci.elan`,
`langsci.flex`, `langsci.igt`. It was rewritten from eldpy 0.0.x (see "Derived from" below); `eldpy` depends on it and gives it the name
that it had.

**Not included any more:** the download of files from the archives of the DELAMAN network (AILLA, ELAR, PARADISEC, TLA), the archive
reports and the corpus analysis of eldpy 0.0.x. Whoever needs them installs `eldpy<0.1`; that code is not maintained (the archives
changed their sites and protect them against crawlers).

Derived from eldpy 0.0.x (S. Nordhoff, MIT).

## License

MIT, see `LICENSE`.
