C'est une bibliothèque Python modulaire qui fournit des outils pour le calcul de similarité, le filtrage de données, et l'analyse de sentiments.
Project description
SentimentAnalysisDarijaNZ
SentimentAnalysisDarijaNZ is a modular Python library designed for text processing in Moroccan Darija (Arabic dialect). The library provides tools for similarity calculation, filtering, and sentiment analysis.
Key Features
1. Similarity Calculation
This module includes advanced similarity measures tailored for Moroccan Darija. It provides functions to compute similarity scores between words or phrases while handling linguistic nuances such as:
- Levenshtein Similarity: Accounts for minor variations in spelling.
- Phonetic Similarity: Matches words based on their phonetic resemblance.
- Sequence Similarity: Uses sequence matching to evaluate structural similarity.
Example:
from SentimentAnalysisDarijaNZ import similarity
similarity_score = similarity.levenshtein_similarity("makla", "maakla")
print(similarity_score)
2. Filtering
This module identifies and filters text based on specific brands, quality indicators, or prices. It also includes spam detection tailored for Moroccan Darija.
Spam Filtering Example:
from SentimentAnalysisDarijaNZ import filtering
positive_spam, neutral_phrases = filtering.spam_analysis(["Check this link www.fake.com", "Free money!"], spam_dict)
print(positive_spam)
Brand Filtering Example:
filtered, not_filtered = filtering.filterbrand([["laptop of good quality"]], "quality")
print(filtered)
3. Sentiment Analysis
Detects positive and negative sentiments in Darija text, accounting for nuances like negations and intensifiers.
Example:
from SentimentAnalysisDarijaNZ import sentiment
positive, negative, neutral = sentiment.sentiment_analysis_darija(["The product is amazing!", "Terrible quality"])
print(positive)
Installation
Install the library via pip:
pip install SentimentAnalysisDarijaNZ
Usage
After installation, import the necessary modules:
from SentimentAnalysisDarijaNZ import similarity, filtering, sentiment
License
This project is licensed under the Apache License 2.0.
Licence
Ce projet est sous licence MIT. Veuillez consulter le fichier LICENSE pour plus d'informations.
Auteur
Nawfal BENHAMDANE
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
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 sentimentanalysisdarijanz-0.3.5.tar.gz.
File metadata
- Download URL: sentimentanalysisdarijanz-0.3.5.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfc46fc98e457feb1592239e8940ed3fd97753eb9c4a79c7ec9f682f643c6f66
|
|
| MD5 |
e2b868244b69ad599b3c0d9fcc34da6e
|
|
| BLAKE2b-256 |
8dbb1e43b3782d5d518a80454a83f0a57e91fb5aa539876bb5e1ca77f9cdd58b
|
File details
Details for the file SentimentAnalysisDarijaNZ-0.3.5-py3-none-any.whl.
File metadata
- Download URL: SentimentAnalysisDarijaNZ-0.3.5-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f70426c2b17dc6ac5b6db0a0d9ae94a9474044c7dcaa787636ef54cd714558a
|
|
| MD5 |
1a5dce9ac5a58edc6426372e71e927bf
|
|
| BLAKE2b-256 |
34b7ffd1f5bfd1dee78258053e4ccedfff866fa67e7d96e1319db8e8b4e7ddeb
|