Take NGram
TakeNGram is a tool to provide analysis of n-grams in a dataset of messages.
The recommendation usage is with the InsightExtractor Cloud CSV output.
The analysis consists in creation of a dictionary with the n-grams of all messages and their respective frequency. Besides the creation of word cloud of the n-grams.
All analysis can be made in a group of sentences of a subject (most useful with the Insight Extractor output).
Overview
Installation
The take_ngram package cab be installed from PyPI.
pip install take_ngram
Usage
For usage the file must have to be a CSV file.
All the examples are based on the Insight Extractor output.
- Creating a BiGram of the sentences and get the WordCloud.
from take_ngram import NGram
bigram = NGram('file.csv',
'Structured Message')
bigram.get_word_cloud()
- Creating a BiGram of the sentences and saving the WordCloud.
from take_ngram import NGram
bigram = NGram('teste.csv',
'Structured Message')
bigram.get_word_cloud(file_path='image.png')
- Adding stop words
from take_ngram import NGram
bigram = NGram('file.csv',
'Structured Message',
stop_words = ['segunda'])
bigram.get_word_cloud(file_path='image.png')
- Removing prepositions from stop words
- By default prepositions are added to the stop words
from take_ngram import NGram
bigram = NGram('file.csv',
'Structured Message',
remove_prepositions=False)
bigram.get_word_cloud(file_path='image.png')
- Making n-grams for some specific subjects.
from take_ngram import NGram
bigram = NGram('file.csv',
'Structured Message',
subject_column = 'Groups',
subject_list = ['fatura','plano'])
bigram.get_word_cloud(file_path='image.png')
Author
Take Blip Data&Analytics Research
Metadata
Release files for take-ngram 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| take_ngram-0.1.1.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| take_ngram-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / take_ngram-0.1.1.tar.gz
| Download URL | take_ngram-0.1.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e11f959e93a99d9763dcd259fa9042c27954a09576978b24cae4c6895a49442
|
|
BLAKE2b-256 checksum How to use checksums |
ce55a189dd915b6437640652233c3da4a160ed3f9983c865491ecede9621a786
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|
Release files / take_ngram-0.1.1-py3-none-any.whl
| Download URL | take_ngram-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52e41f3d60c71fb00bca0121b0b20b47c8c1dff193b4f9dd201b82928dd36251
|
|
BLAKE2b-256 checksum How to use checksums |
bbdcad3073a75ab06ea11be53c36321a12683a1b40d9999011bb49ca92de7c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|
Security for take-ngram 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.