Skip to main content

A python package to create ngrams.

Project description

PyPI - Version GitHub License PyPI - Downloads Publish PyPi CI

pyngramroh

The pyngramroh package contains a python module to create ngrams.

Table of Contents

  1. Introduction

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:

  1. pip install pyngramroh
  2. python -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

MIT

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

pyngramroh-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyngramroh-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for pyngramroh-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0d4da3802324cf8096a29367d06a6b869fef2c086820c565b3062e801f361d3c
MD5 459e07096d1b09d732c593b1d621a92a
BLAKE2b-256 d6f4c3baadb609508feb5e4c32c763c6711056035d02e9111203596df25a536c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyngramroh-0.0.1.tar.gz:

Publisher: release.yaml on IT-Administrators/pyngramroh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyngramroh-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 294ce853eaf7207866758d5111cd318ae7d51c7de5ee79a52283e724b5671a9d
MD5 afff37da898b107640a1b5ca0a63bd14
BLAKE2b-256 c2a290f8222fedd3960f51fca7ea6ac69686419f0a20280ebbe3eb279bf7cb1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyngramroh-0.0.1-py3-none-any.whl:

Publisher: release.yaml on IT-Administrators/pyngramroh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page