Skip to main content

A Python NLP Library for Persian language, by PartDP AI

Project description

https://raw.githubusercontent.com/partdpai/PartNLP/master/images/PartAiLogo.png

PartNLP Project

Overview

documentation

This documentation is all about PartNLP package. PartNLP designs to help developers to perprocessing their text automatically! Also it has many useful features that makes perprocessing more fun! However, This is not an exhaustive description but it should show you how use the package effortlessly.

Introduction

PartNLP is an integrated package uses many famous packages. Moreover, PartNLP supports multi languages. In the below table you can see all valid operations accomplishing by PartNLP and their corresponder packages.

Operations

Keyword

Packages

normalize

NORMALIZE

HAZM, PARSIVAR

sent tokenize

S_TOKENIZE

HAZM, PARSIVAR, STANZA

word tokenize

W_TOKENIZE

HAZM, PARSIVAR, STANZA

lemmatize

LEMMATIZE

HAZM, STANZA

stem

STEM

HAZM, PARSIVAR, STANZA

Installation

for installing, you can simply use pip to install the package.

>>> pip install PartNLP

Pipeline Usage Example

>>> from PartNLP import Pipeline

>>> Pipeline(lang='persian', package='hazm', processors=['W_TOKENIZE', 'LEMMATIZE'], text='این متن، جهت بررسی عملکرد بسته نوشته شده است')

Output of Hazm word tokenizer:
['این', 'متن', '،', 'جهت', 'بررسی', 'عملکرد', 'بسته', 'نوشته_شده_است']
Output of Hazm Lemmatizer :
['این', 'متن', '،', 'جهت', 'بررسی', 'عملکرد', 'بسته', 'نویس']

Pipeline also can handle missing required data in which should be passed by users. In the below example no package, language or processors entered but Pipeline asks you to fill them out.

 >>> Pipeline(text='این متن، جهت بررسی عملکرد بسته نوشته شده است')
Warning: no package selected. List of supported packages:['HAZM', 'PARSIVAR', 'STANZA']
please enter a valid value: 'hazm'
Warning: no language selected. List of supported languages:['ENGLISH', 'PERSIAN']
please enter a valid value: 'persian'
Warning: no operator selected. List of supported operations for 'hazm' package :['NORMALIZE', 'S_TOKENIZE', 'STEM', 'W_TOKENIZE', 'LEMMATIZE']

Interface Usage Example

In this section we are going to see the simple usage of PartNLP package.

https://raw.githubusercontent.com/partdpai/PartNLP/master/images/Interface.gif

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

PartNLP-0.1.33.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

PartNLP-0.1.33-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file PartNLP-0.1.33.tar.gz.

File metadata

  • Download URL: PartNLP-0.1.33.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for PartNLP-0.1.33.tar.gz
Algorithm Hash digest
SHA256 1a05cc04f4dca5320a295fd03524b8386d94acd4473d163ea2cc654f17b2daf6
MD5 52d40adcfdf400ff1db7f78ba2073fa7
BLAKE2b-256 f609fb2e806d3dcbc805cddab9fc4c25963c5cc1608996a896a0a8e3bf293d7b

See more details on using hashes here.

File details

Details for the file PartNLP-0.1.33-py3-none-any.whl.

File metadata

  • Download URL: PartNLP-0.1.33-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for PartNLP-0.1.33-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa65cb12439619914e1c822378c4654dd5d0f208f21b32ee4c44666f90fb2eb
MD5 60138863bc9552bdd4045e01445ac10b
BLAKE2b-256 9d464eae9e56a67e2d693b4fcad4c5fd0d6dd98c6f4942db7db93bb90b57cc72

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