Skip to main content

EmbedTextReducer

TextReducer is a Python library for simplifying text content using advanced Natural Language Processing (NLP) techniques. It filters and summarizes text based on relevance to a given query, making it easier to extract meaningful information from large texts.

Features

  • Split text into sentences.
  • Filter sentences based on token count.
  • Compute cosine similarity between sentences and a given query.
  • Summarize text by relevance to the query.

Installation

Install TextReducer using pip:

pip install embed-text-reducer

Usage

Here's a quick example to get you started:

from embed_text_reducer import TextReducer

# Initialize the simplifier with default models
simplifier = TextReducer()

# Fit the text
text = "Your long text here. It will be split into sentences, filtered, and summarized."
simplifier.fit(text)

# Find relevant sentences to your query
query = "specific information"
summary, tokens = simplifier.find_relevant(query, max_tokens=100)

print("Summary:", summary)
print("Tokens used:", tokens)

Metadata

Release files for embed-text-reducer 0.0.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 embed-text-reducer 0.0.4
File Size Uploaded Provenance Actions
embed-text-reducer-0.0.4.tar.gz 4.8 kB Without provenance Details for embed-text-reducer-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for embed-text-reducer 0.0.4
File Interpreter ABI Platform Actions
embed_text_reducer-0.0.4-py3-none-any.whl Python 3 none any Details for embed_text_reducer-0.0.4-py3-none-any.whl

Total release size: 9.6 kB

Release files / embed-text-reducer-0.0.4.tar.gz

Download URL embed-text-reducer-0.0.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
40f8dd2459883c48a0f69f8f869801f28165efc0ad66d1ef18a7eaa1e172ef54
BLAKE2b-256 checksum
How to use checksums
0672af90902d045f32e66915fadd604cf989611aaee0f2768c05c05f1847cd22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / embed_text_reducer-0.0.4-py3-none-any.whl

Download URL embed_text_reducer-0.0.4-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae65e7cfcd6cf57bafd5e3e3fcedaea64f1a882a6959719106d82f5b71dd74a8
BLAKE2b-256 checksum
How to use checksums
39b14ce0aeec7cd36420ef2de39bab4874c651786a2016b76eaec1a886cd2826
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Security for embed-text-reducer 0.0.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.

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