Skip to main content

د پښتو ژبې لومړنی معیاري بند-کلمو کارپس

Project description

پښتو بند-کلمې

pip install pashto-stopwords
# ۱. فولډر پاک کړئ او بیا جوړ کړئ
rm -rf pashto_stopwords
mkdir -p pashto_stopwords

# ۲. پاک فایل کاپي کړئ
cp stopwords/pashto-stopwords.txt pashto_stopwords/

# ۳. __init__.py سم کړئ (د وروستي سطر فکس!)
cat > pashto_stopwords/__init__.py << 'EOF'
"""
پښتو بند-کلمې v1.0
د پښتو NLP لپاره لومړنی معیاري کارپس
جوړونکی: IPashto AI Team
"""

from pathlib import Path
from typing import Set

__version__ = "1.0.0"
__all__ = ["STOPWORDS", "remove_stopwords"]

# لوستل
STOPWORDS_PATH = Path(__file__).parent / "pashto-stopwords.txt"
STOPWORDS: Set[str] = {
    line.strip() 
    for line in STOPWORDS_PATH.read_text(encoding="utf-8").splitlines()
    if line.strip() and not line.startswith("#")
}

def remove_stopwords(text: str) -> str:
    """د پښتو متن څخه بند-کلمې لیرې کوي"""
    return " ".join(word for word in text.split() if word not in STOPWORDS)

# د ازموینې لپاره
if __name__ == "__main__":
    print(f"پښتو بند-کلمې v{__version__} فعالې شوې!")
    print(f"ټولټال: {len(STOPWORDS)} کلمې")
    print(remove_stopwords("دا یو مثال دی چې آیا دا کار کوي"))

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

pashto_stopwords-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

pashto_stopwords-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file pashto_stopwords-1.0.0.tar.gz.

File metadata

  • Download URL: pashto_stopwords-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pashto_stopwords-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f2d9e0aebc1b5a99297813de83cb0e3086610260f9df2ecddf3206605077e73c
MD5 8a5de5eb26fcfe339e772466f22e24bd
BLAKE2b-256 5965d7911518f6512e1f56dffacd643b090b71ce3c371631699170fda2b301fd

See more details on using hashes here.

File details

Details for the file pashto_stopwords-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pashto_stopwords-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa861af038c8162880f87f80f4e71beea6475be7ecc9bbfbefcdaa7b8e2b1074
MD5 6035acd71e8189295ecd413c87d3979b
BLAKE2b-256 868c06858e6300e237a9ed5a88afd1d3d1472bfb8b773d84619e147ec1ebd728

See more details on using hashes here.

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