Collection of classes and functions for text analysis
Project description
Introduction
Text-analysis-helpers is a collection of classes and functions for text analysis.
Installation
A Python 3 interpreter is required. It is recommended to install the package in a virtual environment in order to avoid corrupting the system's Python interpreter packages.
Install the package using pip.
pip install text-analysis-helpers
python -m nltk.downloader "punkt"
python -m nltk.downloader "averaged_perceptron_tagger"
python -m nltk.downloader "maxent_ne_chunker"
python -m nltk.downloader "words"
python -m nltk.downloader "stopwords"
Usage
You can use the HtmlAnalyser object to analyse the contents of a url.
from text_analysis_helpers.html import HtmlAnalyser
analyser = HtmlAnalyser()
analysis_result = analyser.analyse_url("https://www.bbc.com/sport/formula1/64983451")
analysis_result.save("analysis_result.json")
You can see the scripts in the examples
folder for some usage examples.
There is also an cli utility that can be used to analyse a url. For example to analyse a url and save the analysis result to a json encoded file execute the following command in the terminal.
text-analysis-helpers-cli analyse-url --output analysis_result.json https://www.bbc.com/sport/formula1/64983451
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
Hashes for text-analysis-helpers-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74459c692398c7e59e4d9608338fe3edca05a4db2dbac8a4927068f5a5108d02 |
|
MD5 | 9bc561e2750c441a1fccf8e7e94a89b7 |
|
BLAKE2b-256 | 2d2a858992e95ca72a8d6db680e5b175a1e1c13f86a043c6ea378850f8ed8c36 |
Hashes for text_analysis_helpers-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 555223cde69d1d6ebc15e9204505584d4201cc57e070fcd22608897fe460d56d |
|
MD5 | b95a9286684f8c493c17d49866144851 |
|
BLAKE2b-256 | 2b270b36c181bf06b20721c0d544d4328abe89265e66f627be3090c9577a1468 |