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.5.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

text_analysis_helpers-0.5.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file text-analysis-helpers-0.5.0.tar.gz.

File metadata

  • Download URL: text-analysis-helpers-0.5.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.6 Linux/5.15.0-43-generic

File hashes

Hashes for text-analysis-helpers-0.5.0.tar.gz
Algorithm Hash digest
SHA256 74459c692398c7e59e4d9608338fe3edca05a4db2dbac8a4927068f5a5108d02
MD5 9bc561e2750c441a1fccf8e7e94a89b7
BLAKE2b-256 2d2a858992e95ca72a8d6db680e5b175a1e1c13f86a043c6ea378850f8ed8c36

See more details on using hashes here.

File details

Details for the file text_analysis_helpers-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for text_analysis_helpers-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 555223cde69d1d6ebc15e9204505584d4201cc57e070fcd22608897fe460d56d
MD5 b95a9286684f8c493c17d49866144851
BLAKE2b-256 2b270b36c181bf06b20721c0d544d4328abe89265e66f627be3090c9577a1468

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