Skip to main content

psymarkers

License: GPL v3 Python Version

Biblioteca de Python rápida y eficiente para extraer marcadores psicológicos y lingüísticos de textos. Está basada en literatura clínica y psicológica, y cuantifica patrones del lenguaje comúnmente asociados con estados de depresión, ansiedad, rumiación cognitiva o ideación suicida.

Instalación

Puedes instalar la biblioteca directamente desde PyPi:

pip install psymarkers

Nota: Requiere la descarga previa de los recursos léxicos de nltk si no los tienes en tu entorno. Puedes descargarlos todos automáticamente usando la función download_nltk_resources, integrada en la biblioteca:

import nltk

from psymarkers.resources import download_nltk_resources

download_nltk_resources()
nltk.download('punkt')
nltk.download('punkt_tab')
nltk.download('vader_lexicon')
nltk.download('averaged_perceptron_tagger_eng')

Indicadores disponibles

Los indicadores actuales incluyen:

Ejemplos de uso

Como pipeline en aprendizaje automático

Ya que (intentamos) que todos los indicadores compartan una interfaz común, se puede usar para crear vectores de características limpios y listos para entrenar modelos:

from psymarkers import markers

text = "I am completely exhausted and have no future."
date = "2023-10-27T03:15:00Z"

# 1. Define your feature extraction pipeline
metrics_pipeline = [
    markers.absolutist_ratio,
    markers.pronouns_ratio,
    markers.hopelessness_ratio,
    markers.negative_sentiment,
    markers.temporal_myopia_index,
    markers.type_token_ratio
]

# 2. Extract all features into a dictionary in a single pass
features = {
    metric.__name__: metric(text, date=date)
    for metric in metrics_pipeline
}

# 3. Do whatever you like with the data
print(features)

Licencia

Este proyecto está licenciado bajo los términos de la GNU General Public License v3.0 (GPLv3). Eres libre de usar, modificar y distribuir este software, siempre y cuando las obras derivadas se distribuyan bajo la misma licencia abierta. Para más información, por favor consulta el fichero LICENSE.

Metadata

Release files for psymarkers 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psymarkers 0.1.13
File Size Uploaded Provenance Actions
psymarkers-0.1.13.tar.gz 8.0 kB Without provenance Details for psymarkers-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for psymarkers 0.1.13
File Interpreter ABI Platform Actions
psymarkers-0.1.13-py3-none-any.whl Python 3 none any Details for psymarkers-0.1.13-py3-none-any.whl

Total release size: 16.9 kB

Release files / psymarkers-0.1.13.tar.gz

Download URL psymarkers-0.1.13.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1cbfad20e9fa06f3d3bfd779f78a92930eb954ed27f82c507c64d8d9d59e1d7
BLAKE2b-256 checksum
How to use checksums
bdaed967fe20779334279c43293858a245bb23b3969060a7f9be73e552e3ca38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / psymarkers-0.1.13-py3-none-any.whl

Download URL psymarkers-0.1.13-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3398574b37332c0a1252dcb46d825251aeb7bb61d6907836d9011f61788f837
BLAKE2b-256 checksum
How to use checksums
34687f18fa421d23e7b61c524cf05ad472216a770760da3e6f8120b64c6f1aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for psymarkers 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page