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 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)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file embed-text-reducer-0.0.4.tar.gz.
File metadata
- Download URL: embed-text-reducer-0.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f8dd2459883c48a0f69f8f869801f28165efc0ad66d1ef18a7eaa1e172ef54
|
|
| MD5 |
d669acd718bc9e7b27d805750cc418ae
|
|
| BLAKE2b-256 |
0672af90902d045f32e66915fadd604cf989611aaee0f2768c05c05f1847cd22
|
File details
Details for the file embed_text_reducer-0.0.4-py3-none-any.whl.
File metadata
- Download URL: embed_text_reducer-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae65e7cfcd6cf57bafd5e3e3fcedaea64f1a882a6959719106d82f5b71dd74a8
|
|
| MD5 |
5b67a7955d9ac1f4f76d50e323122793
|
|
| BLAKE2b-256 |
39b14ce0aeec7cd36420ef2de39bab4874c651786a2016b76eaec1a886cd2826
|