Skip to main content

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

text_analysis_helpers-0.6.0.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

text_analysis_helpers-0.6.0-py3-none-any.whl (12.7 kB view hashes)

Uploaded Python 3

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