Skip to main content

Paquetería de funciones para el equipo de AI Morant en Python

Project description

Py-morant

Este proyecto incluye varias funciones útiles que desempeñan diferentes tareas.

Instalación

Para instalar la paquetería pymorant en tu terminal escribe.

pip install pymorant

Es recomendado usar un ambiente virtual.

Funciones

1. corregir_texto

from pymorant import corregir_texto

Regresa el texto corregido ortográficamente, utilizando el modelo de lenguaje especificado.

Parámetros

  • text (str): texto original
  • model (str): modelo de lenguaje a utilizar
  • openai_key (str): llave de OpenAI

Retorna

  • cleaned_text (str): texto limpio

2. generar_variantes_texto

from pymorant import generar_variantes_texto

Regresa una lista de n variantes del texto original, utilizando el modelo de lenguaje especificado. Si formal=True, se generan variantes formales.

Parámetros

  • text (str): texto original
  • n (int): número de variantes a generar
  • model (str): modelo de lenguaje a utilizar
  • openai_key (str): llave de OpenAI
  • formal (bool): si True, se generan variantes formales
  • sex: sexo de la persona a la que se dirige el texto. Puede ser "H" (hombre), "M" (mujer) o "NA" (no aplica).

Retorna

  • lista (list): lista con n variaciones del texto original

3. resumir_texto

from pymorant import resumir_texto

Regresa un resumen del texto original, utilizando el modelo de lenguaje especificado.

Parámetros

  • text (str): texto original
  • model (str): modelo de lenguaje a utilizar
  • openai_key (str): llave de OpenAI
  • input_autogenerado (bool): si True, si el input es auto-generado por el modelo previamente.

Retorna

  • texto (str): resumen del texto original

4. generar_categorias

from pymorant import generar_categorias

Regresa una lista de n categorías del texto original, utilizando el modelo de lenguaje. especificado.

Parámetros

  • text (str): texto original
  • n (int): número de categorías a generar
  • model (str): modelo de lenguaje a utilizar
  • openai_key (str): llave de OpenAI

Retorna

  • lista (list): lista de n categorias del texto original

License

MIT

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

pymorant-0.0.34.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

pymorant-0.0.34-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file pymorant-0.0.34.tar.gz.

File metadata

  • Download URL: pymorant-0.0.34.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pymorant-0.0.34.tar.gz
Algorithm Hash digest
SHA256 b5717d1d8a9b1a56b6c54eb2dba9ed391d071a53b8a3fed1d9435081129fab66
MD5 a692bea5b4ae2fff03eca63a2145674b
BLAKE2b-256 7e75ab98fc3e0bf6d651f1ea249cd9b296290c32b986286ab64505a93bafbcce

See more details on using hashes here.

File details

Details for the file pymorant-0.0.34-py3-none-any.whl.

File metadata

  • Download URL: pymorant-0.0.34-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for pymorant-0.0.34-py3-none-any.whl
Algorithm Hash digest
SHA256 e6867e38e5dc9ff9541347a3e12542bed75f53d193ffa98e9568191fd0d7b985
MD5 d26f218f0b08e93423b0469c50e0fea7
BLAKE2b-256 77d6590518ecfe4b7e1e1994864b230272da2ff65150a4605ef5a144489aa4c4

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