د پښتو ژبې لومړنی معیاري بند-کلمو کارپس
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2d9e0aebc1b5a99297813de83cb0e3086610260f9df2ecddf3206605077e73c
|
|
| MD5 |
8a5de5eb26fcfe339e772466f22e24bd
|
|
| BLAKE2b-256 |
5965d7911518f6512e1f56dffacd643b090b71ce3c371631699170fda2b301fd
|
File details
Details for the file pashto_stopwords-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pashto_stopwords-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa861af038c8162880f87f80f4e71beea6475be7ecc9bbfbefcdaa7b8e2b1074
|
|
| MD5 |
6035acd71e8189295ecd413c87d3979b
|
|
| BLAKE2b-256 |
868c06858e6300e237a9ed5a88afd1d3d1472bfb8b773d84619e147ec1ebd728
|