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.9.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.9-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elotl-0.0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 cd9177e89fe07ae072997e73c928e61a7f02aed674d518238b4b60d5739aa2ea
MD5 04cd62e6673a51541d2b60918e2c81f2
BLAKE2b-256 95d3252b522312c430f1385d47f7d8a6c542bd63bb9e30b8afddb5c8d19d6a25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elotl-0.0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d2098c3973308e0c7c128214f4c7bcb3ba50348fc48db2ef580aa2f701c24c7f
MD5 3423fb65990c7ec48de923bac411b544
BLAKE2b-256 9dcc304604e54c2ad669c4bc57720dc38d6f2c52511c63795d4d5a83f35c0ffb

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