Skip to main content

Paquete para PLN de lenguas originarias

Project description

Elotl Package

Paquete de Python con algoritmos e implementaciones de la comunidad Elotl para PLN de lenguas originarias.

Requiere python>=3.X

Instalación

Utilizando pip

pip install elotl

Desde la fuente

git clone https://github.com/ElotlMX/py-elotl.git
cd py-elotl
pip install -e .

Uso

Trabajando con corpus

import elotl.corpus

Listando corpus disponibles

print("Name\t\tDescription")
list_of_corpus = elotl.corpus.list_of_corpus()
for row in list_of_corpus:
    print(row)

La salida es la siguiente:

Name		Description
['axolotl', 'Is a nahuatl corpus']
['tsunkua', 'Is an otomí corpus']

Cargando un corpus

# Si se solicita un corpus inexistente se retorna un valor 0
axolotl = elotl.corpus.load('axolotlr')
if axolotl == 0:
    print("El nombre ingresado no corresponde a ningun corpus")
# Si se ingresa un corpus existente se retorna una lista
axolotl = elotl.corpus.load('axolotl')
for row in axolotl:
    print(row)
['Hay que adivinar: un pozo, a la mitad del cerro, te vas a encontrar.', 'See tosaasaanil, see tosaasaanil. Tias iipan see tepeetl, iitlakotian tepeetl, tikoonextis san see aameyalli.', '', 'Adivinanzas nahuas']
# Cada elemento de la lista cuenta con cuatro indices:
# lengua_no_originaria, lengua_originaria, variante, nombre_de_documento
tsunkua = elotl.corpus.load('tsunkua')
  for row in tsunkua:
      print(row[0]) # lengua_no_originaria
      print(row[1]) # lengua_originaria
      print(row[2]) # variante
      print(row[3]) #nombre_de_documento
Una vez una señora se emborrachó
nándi na ra t'u̱xú bintí
Otomí del Estado de México (ots)
El otomí de toluca, Yolanda Lastra

Estructura del paquete

La siguiente estructura es una referencia. Conforme el paquete crezca se ira documentando mejor.

elotl/                              Top-level package
          __init__.py               Inicializar el paquete
          corpora/                  Aquí se encuentran los datos de los corpus
          corpus/                   Subpaquete para cargar corpus
                  __init__.py
                  corpus.py          
          nahuatl/                  Subpaquete para el idioma nahuatl
                  __init__.py
                  ...
          otomi/                    Subpaquete para el idioma otomi
                  __init__.py
                  ...

Desarrollo

Crear un entorno virtual y activarlo.

virtualenv --python=/usr/bin/python3 elotl-venv
source elotl-venv/bin/activate

Actualizar pip y generar archivos de distribución.

python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python setup.py clean sdist bdist_wheel

Probar el paquete local

python -m pip install -e .

Enviar a PyPI

python -m pip install twine
twine upload dist/*

Licencia

Mozilla Public License 2.0 (MPL 2.0)

Referencias

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elotl-0.0.1.10.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elotl-0.0.1.10-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file elotl-0.0.1.10.tar.gz.

File metadata

  • Download URL: elotl-0.0.1.10.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for elotl-0.0.1.10.tar.gz
Algorithm Hash digest
SHA256 00d2e9e65a38284b71b3a913922046423c9eae862e1de02bcd3f1e0e9eeb1e9b
MD5 c1e50ed3e25c5782f5db84376ff0b67c
BLAKE2b-256 bb6076b7f7e840488320fdce8beb8b0dd3a52a018a552f5278369ad0a3c1884c

See more details on using hashes here.

File details

Details for the file elotl-0.0.1.10-py3-none-any.whl.

File metadata

  • Download URL: elotl-0.0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for elotl-0.0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 47848625383ce6d8092432169c695103c23b619a5b3508bbca1c315b85c11e1f
MD5 b08d5d5ce4d1bca80660550deb422046
BLAKE2b-256 aa3211dbb8d9fe5368109ae5804c5e1791c6e64c5d84cfc8000bded9d2d2e1ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page