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 interpeter packages.
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"
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("http://www.add-a-url-here.com")
analysis_result.save("analysis_result.html")
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 --json --output analysis_result.json https://www.the-url-to-analyse.com
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
File details
Details for the file text-analysis-helpers-0.3.0.tar.gz
.
File metadata
- Download URL: text-analysis-helpers-0.3.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be90d9b02385c92edf3cf32d65e0d0f8042f0dc43b34816ecf9bd40d400b2d2 |
|
MD5 | a92b41794c649b28afa1db5ff2a539f1 |
|
BLAKE2b-256 | d4eb7e4f65a7c3528e0133b4415e3a1e96ac710c41cd33266665188f3366991b |
File details
Details for the file text_analysis_helpers-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: text_analysis_helpers-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd46bc884627e03b93279f398db2a587bbca4100aa78aa88d3262512e8319212 |
|
MD5 | b47326ead8c41a6af4a1d468ad7ee51e |
|
BLAKE2b-256 | 5240d9600995ae8b146de23315bc6cb1becda0bc0cbe1238a149c096a1443962 |