Skip to main content

textcaret

Simplified NLP Toolkit for common NLP Tasks. Unifying common Natural Language Processing task

Why TextCaret

  • The problem: performing common NLP Task such as summarization,sentiment analysis,etc are essential however you may need to use different libraries and write different codes for performing the same set of task on different texts
  • The goal of TextCaret is to simplify this task by providing a unified framework to perform these common NLP Tasks

Installation

textcaret is available on pypi hence you can install using pip

pip install textcaret

Benefits and Features

  • Generate Reports for Text Analysis
  • Text Summarization
  • Text Visualization
    • wordcloud
    • word frequency plots
    • word length distribution
    • etc
  • Sentiment Analysis
  • Text Generation *
  • etc

Usage

>>> import textcaret as tc 
>>> docx = tc.TextCaret(text='your text goes here')
>>>
>>> docx.visual_report()
>>> docx.summary_report()
>>> docx.sentiment_report()
>>> docx.general_report()

Perform Text Visualization For Insights

  • This generates wordcloud plots,token and tags frequency plots, word length distribution and more.
>>> from textcaret import TextViz
>>> s = "your text"
>>> viz = TextViz(s)
>>> viz.visualize()
>>> # Save Plot
>>> viz.safe_figure('mynewplot.png')

Perform TextSummarization

  • In NLP Text Summarization is the process of shortening a set of data computationally, to create a subset (a summary) that represents the most important or relevant information within the original content.[wiki]
  • It is the process of finding the most informative sentence in a document.
  • TextCaret uses several extractive algorithms for generating summary
>>> from textcaret import TextSummarizer
>>> s = "your text"
>>> summarizer = TextSummarizer(s)
>>> summarizer.summarize()

Perform Sentiment Analysis

  • In NLP, Sentiment Analysis is the process of identifying the emotions/sentiment or feeling in a given text either as positive,negative or neutral.
  • It is a form of text classification
  • TextCaret uses the famous textblob library behind the scene to generate sentiments of given text
>>> from textcaret import TextSentiment
>>> docx = TextSentiment("I love coding and teaching.John hates mangoes so bad he doesn't eat it")
>>> 
>>> docx.sentiment()
{'sentence': "I love coding and teaching.John hates mangoes so bad he doesn't eat it", 'sentiment': Sentiment(polarity=-0.09999999999999992, subjectivity=0.6333333333333333)}
>>> 
>>> docx.sentiment()['sentiment']
Sentiment(polarity=-0.09999999999999992, subjectivity=0.6333333333333333)
>>> 
>>> docx.sentiment()['sentiment'].polarity
-0.09999999999999992
>>> 
>>> docx.sentiment()['sentiment'].subjectivity
0.6333333333333333
>>> 

Perform Sentiment on Splitted/Tokenized Sentences

>>> docx.split_sentence=True
>>> 
>>> docx.sentiment()
{'sentiment': [('I love coding and teaching', 0.5), ("John hates mangoes so bad he doesn't eat it", -0.6999999999999998)]}
>>> 

Dependencies

Textcaret is built ontop of powerful and common NLP libraries such as below

  • NLTK
  • TextBlob
  • Sumy
  • Neattext
  • Matplotlib
  • Wordcloud
  • Spacy

.

  • Maintainer: Jesse E.Agbe(JCharis)
  • Jesus Saves @JCharisTech

Contributions

  • Notice a bug, please let us know
  • We appreciate contributions of anykind.
  • Happy Coding!!! :smiley:

Release files for textcaret 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for textcaret 0.0.1
File Size Uploaded
textcaret-0.0.1.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for textcaret 0.0.1
File Interpreter ABI Platform
textcaret-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size:19.8 kB

Release files / textcaret-0.0.1.tar.gz

Download URL textcaret-0.0.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
94c2edf12b3fcf4174d524470189d5e02b6bb5c6c9ad589b1f3501278fd45ca4
BLAKE2b-256 checksum
How to use checksums
dfdc9856a74181e90687d89861ab6f4c7e337c92a684c730667b683da4681a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic

Release files / textcaret-0.0.1-py3-none-any.whl

Download URL textcaret-0.0.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
512c2a5a4a81a4537937a597ba85091917fa12e550bae6bb5e08d4590b17d697
BLAKE2b-256 checksum
How to use checksums
92fa38d6cca0bae9e18a3a275445b05c0853ef7f32efc25823bd838141de6e0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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