A python package to create ngrams.
Project description
pyngramroh
The pyngramroh package contains a python module to create ngrams.
Table of Contents
Introduction
This package contains a module to create ngrams, it does not create statistics about the created ngrams. An explanation what a ngram is can be found here: ngram
Getting started
Prerequisites
- Python installed
- Operatingsystem: Linux or Windows, not tested on mac
- IDE like VS Code, if you want to contribute or change the code
Installation
There are two ways to install this module depending on the way you work and the preinstalled modules:
pip install pyngramrohpython -m pip install pyngramroh
How to use
How to import
You can import the module in two ways:
import pyngramroh
This will import all functions. Even the ones that are not supposed to be used (helper functions).
from pyngramroh import *
This will import only the significant functions, meant for using.
Using the module
Example 1:
# Import all modules from package.
from pyngramroh import *
ng = NGram("Demo",2,True)
print(ng.generate_ngram())
# Output:
#
# ['_D', 'De', 'em', 'mo', 'o_']
# Import all modules from package.
from pyngramroh import *
ng = NGram("This is a demo string",2)
print(ng.create_ngram())
# Output:
#
# ["This_is","is_a","a_demo","demo_string"]
Releasing
Releases are published automatically when a tag is pushed to GitHub.
# Create release variable.
$Release = "x.x.x"
# Create commit.
git commit --allow-empty -m "Release $Release"
# Create tag.
git tag -a $Release -m "Version $Release"
# Push from original.
git push origin --tags
# Push from fork.
git push upstream --tags
License
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyngramroh-0.0.1.tar.gz.
File metadata
- Download URL: pyngramroh-0.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4da3802324cf8096a29367d06a6b869fef2c086820c565b3062e801f361d3c
|
|
| MD5 |
459e07096d1b09d732c593b1d621a92a
|
|
| BLAKE2b-256 |
d6f4c3baadb609508feb5e4c32c763c6711056035d02e9111203596df25a536c
|
Provenance
The following attestation bundles were made for pyngramroh-0.0.1.tar.gz:
Publisher:
release.yaml on IT-Administrators/pyngramroh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyngramroh-0.0.1.tar.gz -
Subject digest:
0d4da3802324cf8096a29367d06a6b869fef2c086820c565b3062e801f361d3c - Sigstore transparency entry: 772622371
- Sigstore integration time:
-
Permalink:
IT-Administrators/pyngramroh@05e831f21f1a1f8a79bfe419975e3546b5485571 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/IT-Administrators
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@05e831f21f1a1f8a79bfe419975e3546b5485571 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyngramroh-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyngramroh-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
294ce853eaf7207866758d5111cd318ae7d51c7de5ee79a52283e724b5671a9d
|
|
| MD5 |
afff37da898b107640a1b5ca0a63bd14
|
|
| BLAKE2b-256 |
c2a290f8222fedd3960f51fca7ea6ac69686419f0a20280ebbe3eb279bf7cb1b
|
Provenance
The following attestation bundles were made for pyngramroh-0.0.1-py3-none-any.whl:
Publisher:
release.yaml on IT-Administrators/pyngramroh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyngramroh-0.0.1-py3-none-any.whl -
Subject digest:
294ce853eaf7207866758d5111cd318ae7d51c7de5ee79a52283e724b5671a9d - Sigstore transparency entry: 772622378
- Sigstore integration time:
-
Permalink:
IT-Administrators/pyngramroh@05e831f21f1a1f8a79bfe419975e3546b5485571 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/IT-Administrators
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@05e831f21f1a1f8a79bfe419975e3546b5485571 -
Trigger Event:
push
-
Statement type: