Skip to main content

text-features

PyPi

A library for processing text features in a dataframe.

Dependencies :globe_with_meridians:

Python 3.11.6:

Raison D'être :thought_balloon:

textfeats transforms text into values that can be used by a model.

Architecture :triangular_ruler:

textfeats is a functional library, meaning that each phase of feature extraction gets put through a different function until the final output. The features its computes are as follows:

  1. Embeddings - A mean of all the embeddings from the text values in the row.
  2. Stemmer - A count of the keywords containing the stem from the text values in the row.
  3. Sentiment - A measure of the positive / negative sentiment from the text values in the row.
  4. Objectivity - A measure of the objectivity / subjectivity from the text values in the row.
  5. Count - The number of words from the text values in the row.

Installation :inbox_tray:

This is a python package hosted on pypi, so to install simply run the following command:

pip install textfeats

or install using this local repository:

python setup.py install --old-and-unmanageable

Usage example :eyes:

The use of textfeatures is entirely through code due to it being a library. It attempts to hide most of its complexity from the user, so it only has a few functions of relevance in its outward API.

Generating Features

To generate features:

import datetime

import pandas as pd

from textfeats.process import process

df = ... # Your timeseries dataframe
df = process(df, True, {"injuries"})

This will produce a dataframe that contains the new text related features.

License :memo:

The project is available under the MIT License.

Metadata

Release files for textfeats 0.1.4

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

Source distribution (sdist)

Source distribution for textfeats 0.1.4
File Size Uploaded Provenance
textfeats-0.1.4.tar.gz 7.2 kB Without provenance Details

Release files / textfeats-0.1.4.tar.gz

Download URL textfeats-0.1.4.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
949abd605d6005ca9ef6ab24233dd1a33ef7f7d965ffeef584110dfa4c01b2ae
BLAKE2b-256 checksum
How to use checksums
3dc4afe67a879de05658f7cb9b44fb4966b298d191bf26ad5dde5952800a82b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Security for textfeats 0.1.4

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.

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