Skip to main content

A Python library for Punjabi language stopwords.

Project description

Punjabi Stopwords Library

The punjabi_stopwords library is a Python package providing a collection of stopwords in the Punjabi language. Stopwords are words which are filtered out before processing natural language data. They are typically words that are very common in the language and do not contribute much to the meaning of a sentence, especially when performing tasks like text analysis or natural language processing.

Main Features

The punjabi_stopwords package offers several functionalities, including:

  1. Identifying Punjabi stopwords in text.
  2. Removing Punjabi stopwords from text.
  3. Adding custom stopwords to the existing list.

Install the Package

You can install punjabi_stopwords directly from PyPI

Installation

Install punjabi_stopwords using pip:

pip install punjabi_stopwords

Usage

Here's how to use the punjabi_stopwords library in your Python projects:

Check if a word is a stopword

from punjabi_stopwords import is_stopword

word = 'ਇਸ'
print(is_stopword(word))  # Returns: True if the word is a stopword, False otherwise

Output

True

Remove stopwords from text

from punjabi_stopwords import remove_stopwords

sample_text = 'ਇਹ ਇੱਕ ਉਦਾਹਰਣ ਵਾਕ ਹੈ।'
filtered_text = remove_stopwords(sample_text)
print(filtered_text)

Output

ਉਦਾਹਰਣ ਵਾਕ

Add additional stopwords

from punjabi_stopwords import add_stopwords

additional_stopwords = ['ਨਵਾਂਸਟਾਪਵਰਡ1', 'ਨਵਾਂਸਟਾਪਵਰਡ2']
add_stopwords(additional_stopwords)

Contributing

Contributions to punjabi_stopwords are welcome! If you have suggestions for additional stopwords, or improvements to the existing list, please feel free to contribute.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

punjabi_stopwords-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

punjabi_stopwords-1.0.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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