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

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.14
File Size Uploaded Provenance Actions
psymarkers-0.1.14.tar.gz 8.2 kB Without provenance Details for psymarkers-0.1.14.tar.gz

Built distribution (wheel)

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

Total release size: 17.2 kB

Release files / psymarkers-0.1.14.tar.gz

Download URL psymarkers-0.1.14.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
27eb5b64dd95be42f2a1f623067c487a05a4ab82f9e1d306b032447b5e450a3f
BLAKE2b-256 checksum
How to use checksums
8c2c1b404314ad092188118f99fe927a4209b91cc93e44bd1d29989cd47b27c4
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.14-py3-none-any.whl

Download URL psymarkers-0.1.14-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac65a8bdef44732d4ac4fe48b1f9f12c40ef0f4d9dbee66dd9c1f6044886dcc4
BLAKE2b-256 checksum
How to use checksums
d19de44196397ed0fd9a7862bf9d56741ca19fea52aa57507804fc2cb1726915
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.14

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