Skip to main content

A simple text simplification tool using advanced NLP techniques.

Project description

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 text_simplifier 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)

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

embed-text-reducer-0.0.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

embed_text_reducer-0.0.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file embed-text-reducer-0.0.3.tar.gz.

File metadata

  • Download URL: embed-text-reducer-0.0.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for embed-text-reducer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f3f5c8658739a558e4c399c5aeaca8bdb422a729bd22dd9a87902ab39aa24d61
MD5 6ef1e034ecbc3baea219b069a11bc0a2
BLAKE2b-256 38f56799f2c47a9491abc8dbdb77360162a360dcb19ecbb23b5a9973eb9c5f72

See more details on using hashes here.

File details

Details for the file embed_text_reducer-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for embed_text_reducer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 890474aa38ff9b44f372a08eb64e43f0b6cc6e0a210240bc8f6da7b31577ec45
MD5 f1f273b41787ce56bfa6cba4ca8ba5b2
BLAKE2b-256 34918fbdcd536d5a8a082bf941d198705d1de5d11891a19a8d6717315402eaeb

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