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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for embed_text_reducer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c509db9d3d1fcc8f8210fd65ffef44ebde39dc4c3afa78038dab2272f26fcf21
MD5 9e56df70c08bef6b397827c53ecadf98
BLAKE2b-256 98a3be335b8a946d5241a1a8f5006a4b3bc77936190fe1630e258e5dcfc29a85

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