Spaces:
Sleeping
Sleeping
dict
Browse files
app.py
CHANGED
@@ -65,11 +65,14 @@ english_topic_labels = [
|
|
65 |
# New Function to Classify Topics by Keywords
|
66 |
def classify_topic_by_keywords(text, topic_labels):
|
67 |
# Dictionnaire de mots-clés pour chaque topic
|
|
|
68 |
keywords = {
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
73 |
|
74 |
# Convertir le texte en minuscule pour éviter les incohérences
|
75 |
text = text.lower()
|
|
|
65 |
# New Function to Classify Topics by Keywords
|
66 |
def classify_topic_by_keywords(text, topic_labels):
|
67 |
# Dictionnaire de mots-clés pour chaque topic
|
68 |
+
|
69 |
keywords = {
|
70 |
+
"خدمة العملاء": ["خدمة", "استفسار", "مساعدة", "دعم", "سؤال", "استفسار"],
|
71 |
+
"خدمة الاحتفاظ": ["احتفاظ", "تجديد", "خصم", "عرض", "العرض"],
|
72 |
+
"مشكلة في الفاتورة": ["فاتورة", "دفع", "مشكلة", "خطأ", "مبلغ"],
|
73 |
+
"إلغاء الخدمة": ["إلغاء", "إيقاف", "إلغاء الاشتراك", "إلغاء الخدمة", "إيقاف الخدمة", "إلغاء العقد", "إيقاف الاشتراك", "فسخ", "إيقاف التجديد"]
|
74 |
+
}
|
75 |
+
|
76 |
|
77 |
# Convertir le texte en minuscule pour éviter les incohérences
|
78 |
text = text.lower()
|