Skip to main content

Simplified NLP Toolkit for unifying common Natural Language Processing Tasks

Project description

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:

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

textcaret-0.0.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

textcaret-0.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file textcaret-0.0.1.tar.gz.

File metadata

  • Download URL: textcaret-0.0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic

File hashes

Hashes for textcaret-0.0.1.tar.gz
Algorithm Hash digest
SHA256 94c2edf12b3fcf4174d524470189d5e02b6bb5c6c9ad589b1f3501278fd45ca4
MD5 9bfc8def5a007ae9cc2365d2c870e0f0
BLAKE2b-256 dfdc9856a74181e90687d89861ab6f4c7e337c92a684c730667b683da4681a55

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textcaret-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.8.0-63-generic

File hashes

Hashes for textcaret-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 512c2a5a4a81a4537937a597ba85091917fa12e550bae6bb5e08d4590b17d697
MD5 6262d2a836fb2ef1f48e6f49e369a77f
BLAKE2b-256 92fa38d6cca0bae9e18a3a275445b05c0853ef7f32efc25823bd838141de6e0e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page