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.7 .

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: elotl-0.0.1.6.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.0 CPython/3.8.2

File hashes

Hashes for elotl-0.0.1.6.tar.gz
Algorithm Hash digest
SHA256 a48eec82a6af45a1aacd32a6e4b49c0d3783e4c92769d009a2da27de38826983
MD5 487e3134abb0351c261e41285ee68e52
BLAKE2b-256 969b0eb737051905da40f671523a8bf618f903e88b26b534939c5d17b0730d00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elotl-0.0.1.6-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.0 CPython/3.8.2

File hashes

Hashes for elotl-0.0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8569ddd9d571df652d1421df9696c268d6784f510db4cfaba929fa9e70f56351
MD5 04155e78bf028883c05dfe54b22aba6f
BLAKE2b-256 756469b1c88e1c8d6ff13f470b942247418fae8a5d6d7b6fbf9ab417f4457760

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