Skip to main content

Pashto Natural Language Processing Toolkit

Project description

NLPashto – NLP Toolkit for Pashto

NLPashto is a python suite for supporting research and development in Pashto Natural Language Processing. NLPashto project is initiated at Shanghai Jiao Tong University, China

Prerequisites

To use NLPashto you will need:

  • Python 3.8+

Installing NLPashto

You can install pashto from PyPi using this command

pip install nlpashto

Using NLPashto

Word Segmentation

from nlpashto import word_tokenizer

text = 'همدارنګه تیره شپه او ورځ په هیواد کې د کرونا ویروس له امله ۵ تنه مړه شوي'
tokenized = word_tokenizer(text)
print(tokenized)

Output: ['همدارنګه', 'تیره', 'شپه', 'او', 'ورځ', 'په', 'هیواد', 'کې', 'د', 'کرونا ویروس', 'له امله', '۵', 'تنه', 'مړه', 'شوي']

POS Tagging

from nlpashto import pos_tagger

text = 'همدارنګه تیره شپه او ورځ په هیواد کې د کرونا ویروس له امله ۵ تنه مړه شوي'
tokenized = word_tokenizer(text)
tagged = pos_tagger(tokenized)
print(tagged) 

Output: [['همدارنګه', 'RB'], ['تیره', 'JJ'], ['شپه', 'NNF'], ['او', 'CC'], ['ورځ', 'NNM'], ['په', 'IN'], ['هیواد', 'NNM'], ['کې', 'PT'], ['د', 'IN'], ['کرونا ویروس', 'NNP'], ['له امله', 'RB'], ['۵', 'NB'], ['تنه', 'NNS'], ['مړه', 'JJ'], ['شوي', 'VBDX']]

Whitespace Correction (Proofing)

Offensive Comments Detection

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

nlpashto-0.0.8.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

nlpashto-0.0.8-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file nlpashto-0.0.8.tar.gz.

File metadata

  • Download URL: nlpashto-0.0.8.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for nlpashto-0.0.8.tar.gz
Algorithm Hash digest
SHA256 88231cdb1389f910e62eca1de5f54df1e6acbb47bda9b389dd9f0bda06d964b5
MD5 17f161e38badb3c9067a7d0a795161d7
BLAKE2b-256 db2ea9ef012d7323462bbefcbbe86583ceb7cf7c1902e05c2e70a94a61f96eca

See more details on using hashes here.

Provenance

File details

Details for the file nlpashto-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: nlpashto-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for nlpashto-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 920f1b5ad3b3a87df08a08f4914e77e68f781a85fa6c0dd2b28754ad9fac757b
MD5 32bf69f8f92ee10f5b3f6af89c895025
BLAKE2b-256 722d267a24d47b75484e7ead6568a11c184984dd969a074fb3817c333e64f75e

See more details on using hashes here.

Provenance

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