Rozha
A package to simplify and streamline a number of natural language processing processes and methods for a wide variety of languages, empowering users to use NLP on both non-English and English texts.
Installation
Install using pip:
pip3 install rozha
Or download the GitHub repo and the install the requirements:
pip3 install -r requirements.txt
Then begin using the package by importing the modules you plan to use. Rozha is structured into three classes: process, analyze, and visualize. If running from a local copy of the files, use the following:
from process import process
from analyze import analyze
from visualize import visualize
If you installed using pip, use this syntax:
import rozha.process as process (or whatever name you choose)
import rozha.analyze as analyze (or whatever name you choose)
import rozha.visualize as visualize (or whatever name you choose)
Full Documentation
A full list of the package's functions can be viewed at this link.
Example Pipelines
Some example pipelines for working with the package are as follows: Open a file, perform word tokenization and remove stopwords, make the text lowercase, and then get part-of-speech tags for the text:
import rozha.process as process
import rozha.analyze as analyze
word_tokenized = process.lowerFile("your_file.txt")
pos_tags = analyze.posList(word_tokenized)
print(pos_tags)
Open a file, perform sentence tokenization without removing stopwords, and then perform named entity recognition on each sentence using spaCy:
import rozha.process as process
import rozha.analyze as analyze
sent_tokenized = process.sentTokenizeFile(your_file.txt)
ner_tags = analyze.spacyNer(sent_tokenized, 'en')
print(ner_tags)
Perform word tokenization and remove stopwords from a string, make the text lowercase, and graph the 10 most common words as a bar graph:
import rozha.process as process
import rozha.visualize as visualize
word_tokenized = process.lowerVar(text)
# pass the var, number of words to graph, the height and width of the graph, and your preferred filename
visualize.barFreq(word_tokenized, 10, 400, 400, 'my_graph')
Contributing
Contributions are welcome! The following features are of particular interest:
- Increasing the number of methods in the analyze class
- Increasing the number of methods in the visualization class
Metadata
Release files for rozha 1.0.0
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 | Actions |
|---|---|---|---|---|
| rozha-1.0.0.tar.gz | 41.5 kB | Without provenance | Details for rozha-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rozha-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for rozha-1.0.0-py3-none-any.whl |
Total release size: 77.3 kB
Release files / rozha-1.0.0.tar.gz
| Download URL | rozha-1.0.0.tar.gz |
|---|---|
| Size | 41.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cdf81f5959ae11e9c1f2ecd5f51c55ca562311272b4b57e81cbaa04deda64c0
|
|
BLAKE2b-256 checksum How to use checksums |
0f27aa84f603dc7f400a451c9e0c3193db8e7a32c016d1bfaa5c3fd8fd569e78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Release files / rozha-1.0.0-py3-none-any.whl
| Download URL | rozha-1.0.0-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e876c90f4ca2ee03da7da60b669ecb71748b0c96ba21fe535c9f36690581ca59
|
|
BLAKE2b-256 checksum How to use checksums |
42df3888cd7ec892c478079e3c1764ddd5bda4c48ad4f47699d6ded897194b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Security for rozha 1.0.0
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.