Skip to main content

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

  • Elève-Ingénieur à l'Ecole Centrale Casablanca Zaynab RAOUNAK
  • Elève-Ingénieur à l'Ecole Centrale Casablanca Hamza Laraisse
  • Elève-Ingénieur à l'Ecole Centrale Casablanca

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

sentimentanalysisdarijanz-0.3.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

SentimentAnalysisDarijaNZ-0.3.2-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file sentimentanalysisdarijanz-0.3.2.tar.gz.

File metadata

File hashes

Hashes for sentimentanalysisdarijanz-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7600eb6546b1533122edd9c63c8639f9b33bf6dbb7394e2197d04fd62185719f
MD5 fd91d44058fd1cf9d915c07fa98f378a
BLAKE2b-256 de4dcd95b2bdc0b0471ecc222314c898842f1fe1b9ed39d3e7752b76caab1727

See more details on using hashes here.

File details

Details for the file SentimentAnalysisDarijaNZ-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for SentimentAnalysisDarijaNZ-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10ae14f82003898171170b852b423123a974cabf24ff59773211a3c4e4bb64ae
MD5 8f1d981450c971adac3d9404f4862fb9
BLAKE2b-256 1fd655dfa2cb91d608bcfc064630d5ee9e81ebdc13a8e793de6c68e1f2ab7913

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