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 text-simplifier

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for embed_text_reducer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1efe230e5e39f0fe9808bc8393ea8b5107ffc7e6db3c38fc42839dae5e39b4ba
MD5 0d9bfe95841cdf1bdbcd50d9c7b9ce3d
BLAKE2b-256 46acb3198573a3afc68441e0e0910307a02c832901ebd2d72e78e2a2cc8ccb47

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