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/elotl_pkg.git
cd elotl_pkg
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
rm -rf build/ dist/ elotl.egg-info/
python setup.py clean sdist bdist_wheel

Probar el paquete local

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.4.tar.gz (2.0 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.4-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elotl-0.0.1.4.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for elotl-0.0.1.4.tar.gz
Algorithm Hash digest
SHA256 fcc6fe1cff70f1b2fd029eabc742bf98645bd5c0618aa7184b674e7cab56ea24
MD5 461ab482142f051d735b01cc0ac35dad
BLAKE2b-256 b7dc05f21e7f9df3f98d02269d30bdcfcb4c15f0e08ffced2395573c41f2fbb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elotl-0.0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for elotl-0.0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fa731f398b8897ba061aaea4069c589cff0f8482e5c6da4fcfcaaffd76f149be
MD5 bb6668f8878a5f0afeb417ec674f8318
BLAKE2b-256 b0d6f2fd3d71159990ad65e09514220e54cd306431a0a670eb4e21900be2969c

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