MahmoudNasser
commited on
Commit
·
50f37ce
1
Parent(s):
0901162
Delete Server
Browse files- Server/Classes.py +0 -159
- Server/Cleaning.py +0 -84
- Server/Database.py +0 -68
- Server/arabic_stop_words.txt +0 -622
- Server/main.py +0 -47
- Server/models.py +0 -43
- Server/requirements.txt +0 -18
- Server/schemas.py +0 -19
- Server/test.py +0 -9
- Server/text-to-emotions-firebase-adminsdk-8isbn-dffbdf01e8.json +0 -13
Server/Classes.py
DELETED
@@ -1,159 +0,0 @@
|
|
1 |
-
from firebase_admin import credentials
|
2 |
-
from firebase_admin import firestore
|
3 |
-
import threading
|
4 |
-
from firebase_admin import db
|
5 |
-
# Import the Firebase Admin SDK
|
6 |
-
import firebase_admin
|
7 |
-
db = firestore.client()
|
8 |
-
|
9 |
-
class Shakwa(object):
|
10 |
-
def __init__(self, address, complaintbody, date, governorate, id,organization,summary,title,userid):
|
11 |
-
self.address = address
|
12 |
-
self.complaintbody = complaintbody
|
13 |
-
self.date = date
|
14 |
-
self.governorate = governorate
|
15 |
-
self.id = id
|
16 |
-
self.organization = organization
|
17 |
-
self.summary = summary
|
18 |
-
self.title = title
|
19 |
-
self.userid = userid
|
20 |
-
|
21 |
-
|
22 |
-
# Get the user data from Firestore
|
23 |
-
def get_data(self):
|
24 |
-
# Get a document reference with the user's email as the ID
|
25 |
-
doc_ref = db.collection('complaints').document(self.id)
|
26 |
-
# Get the document snapshot
|
27 |
-
doc = doc_ref.get()
|
28 |
-
# Check if the document exists
|
29 |
-
if doc.exists:
|
30 |
-
# Return the document data as a User object
|
31 |
-
return Shakwa.from_dict(doc.to_dict())
|
32 |
-
else:
|
33 |
-
# Return None if the document does not exist
|
34 |
-
return None
|
35 |
-
|
36 |
-
# Convert a dictionary to a User object
|
37 |
-
@staticmethod
|
38 |
-
def from_dict(source):
|
39 |
-
# Check if the source is a valid dictionary
|
40 |
-
if not isinstance(source, dict):
|
41 |
-
raise ValueError('Source is not a dictionary')
|
42 |
-
# Create a User object with the source values
|
43 |
-
shakwa = Shakwa(
|
44 |
-
source['address'],
|
45 |
-
source['complaintbody'],
|
46 |
-
source['date'],
|
47 |
-
source['governorate'],
|
48 |
-
source['organization'],
|
49 |
-
source['summary'],
|
50 |
-
source['title'],
|
51 |
-
source['userid'],
|
52 |
-
source['id']
|
53 |
-
)
|
54 |
-
# Return the User object
|
55 |
-
return shakwa
|
56 |
-
|
57 |
-
# Convert a User object to a dictionary
|
58 |
-
def to_dict(self):
|
59 |
-
# Create a dictionary with the user's attributes
|
60 |
-
dest = {
|
61 |
-
'address': self.address,
|
62 |
-
'complaintbody': self.complaintbody,
|
63 |
-
'date': self.date,
|
64 |
-
'governorate': self.governorate,
|
65 |
-
'organization':self.organization,
|
66 |
-
'summary': self.summary,
|
67 |
-
'title': self.title,
|
68 |
-
'userid': self.userid,
|
69 |
-
'id': self.id,
|
70 |
-
}
|
71 |
-
# Return the dictionary
|
72 |
-
return dest
|
73 |
-
|
74 |
-
# Represent a User object as a string
|
75 |
-
def __repr__(self):
|
76 |
-
return (
|
77 |
-
f'Shakwa('
|
78 |
-
f'address={self.address}, '
|
79 |
-
f'complaintbody={self.complaintbody}, '
|
80 |
-
f'date={self.date}, '
|
81 |
-
f'governorate={self.governorate}, '
|
82 |
-
f'organization={self.organization}'
|
83 |
-
f'summary={self.summary}'
|
84 |
-
f'title={self.title}'
|
85 |
-
f'userid={self.userid}'
|
86 |
-
f'id={self.id}'
|
87 |
-
f')'
|
88 |
-
)
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
class Feedback(object):
|
94 |
-
def __init__(self,date, feedback, id,review,userid):
|
95 |
-
self.date = date
|
96 |
-
self.feedback = feedback
|
97 |
-
self.id=id
|
98 |
-
self.review=review
|
99 |
-
self.userid=userid
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
# Get the Feedback data from Firestore
|
105 |
-
def get_data(self):
|
106 |
-
# Get a document reference with the Feedback's Id
|
107 |
-
doc_ref = db.collection('feedbacks').document(self.id)
|
108 |
-
# Get the document snapshot
|
109 |
-
doc = doc_ref.get()
|
110 |
-
# Check if the document exists
|
111 |
-
if doc.exists:
|
112 |
-
# Return the document data as a Feedback object
|
113 |
-
return Feedback.from_dict(doc.to_dict())
|
114 |
-
else:
|
115 |
-
# Return None if the document does not exist
|
116 |
-
return None
|
117 |
-
|
118 |
-
# Convert a dictionary to a Feedback object
|
119 |
-
@staticmethod
|
120 |
-
def from_dict(source):
|
121 |
-
# Check if the source is a valid dictionary
|
122 |
-
if not isinstance(source, dict):
|
123 |
-
raise ValueError('Source is not a dictionary')
|
124 |
-
# Create a Feedback object with the source values
|
125 |
-
shakwa = Feedback(
|
126 |
-
source['date'],
|
127 |
-
source['feedback'],
|
128 |
-
source['id'],
|
129 |
-
source['review'],
|
130 |
-
source['userid'],
|
131 |
-
)
|
132 |
-
# Return the User object
|
133 |
-
return Feedback
|
134 |
-
|
135 |
-
# Convert a Feedback object to a dictionary
|
136 |
-
def to_dict(self):
|
137 |
-
# Create a dictionary with the Feedback's attributes
|
138 |
-
dest = {
|
139 |
-
'date': self.date,
|
140 |
-
'feedback': self.feedback,
|
141 |
-
'id': self.id,
|
142 |
-
'review': self.review,
|
143 |
-
'userid': self.userid,
|
144 |
-
|
145 |
-
}
|
146 |
-
# Return the dictionary
|
147 |
-
return dest
|
148 |
-
|
149 |
-
# Represent a Feedback object as a string
|
150 |
-
def __repr__(self):
|
151 |
-
return (
|
152 |
-
f'Feedback('
|
153 |
-
f'date={self.date}, '
|
154 |
-
f'feedback={self.feedback}, '
|
155 |
-
f'id={self.id}, '
|
156 |
-
f'review={self.review}, '
|
157 |
-
f'userid={self.userid}'
|
158 |
-
f')'
|
159 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/Cleaning.py
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
from nltk.stem.isri import ISRIStemmer
|
2 |
-
from pyarabic.araby import strip_tashkeel, strip_tatweel
|
3 |
-
import numpy as np
|
4 |
-
import pandas as pd
|
5 |
-
import json
|
6 |
-
import re
|
7 |
-
import time
|
8 |
-
import os
|
9 |
-
import math
|
10 |
-
import random
|
11 |
-
|
12 |
-
isristemmer = ISRIStemmer()
|
13 |
-
def stemming(txt):
|
14 |
-
return isristemmer.stem(txt)
|
15 |
-
|
16 |
-
|
17 |
-
def remove_singleCharacter(text):
|
18 |
-
text_tokenized = ar.tokenize(text)
|
19 |
-
clean_txt = ''
|
20 |
-
for word in text_tokenized:
|
21 |
-
if len(word) != 1:
|
22 |
-
clean_txt = clean_txt + word + ' '
|
23 |
-
|
24 |
-
return clean_txt[:-1]
|
25 |
-
|
26 |
-
# remove_punctuations
|
27 |
-
def remove_punctuations(text):
|
28 |
-
punc = '''()-[]{};:'"\,<>./@#$%^&*،؛_~'''
|
29 |
-
arabic_punctuations = '''`÷×؛_ـ،/:".,'~¦+|”…“–ـ=﴾﴿ ﹱ ﹹ ⸀˓• ב'''
|
30 |
-
punctuations_list = punc + arabic_punctuations
|
31 |
-
for x in punctuations_list:
|
32 |
-
text = text.replace(x, ' ')
|
33 |
-
return text
|
34 |
-
|
35 |
-
|
36 |
-
def normalize_text(txt):
|
37 |
-
txt = strip_tashkeel(txt)
|
38 |
-
txt = strip_tatweel(txt)
|
39 |
-
txt = ''.join(txt[i] for i in range(len(txt)) if i ==
|
40 |
-
0 or txt[i-1] != txt[i]) # remove repeated characters
|
41 |
-
return txt
|
42 |
-
|
43 |
-
|
44 |
-
def remove_stopwords(txt, path="stopword.txt"):
|
45 |
-
text_tokenized = txt.split(' ')
|
46 |
-
clean_txt = ''
|
47 |
-
# useful_words=[]
|
48 |
-
# filtered_sentence=" "
|
49 |
-
arabic_stop_words_file = open(path, 'r', encoding='utf-8')
|
50 |
-
arabic_stop_words = arabic_stop_words_file.read().split('\n')
|
51 |
-
for word in text_tokenized:
|
52 |
-
if word not in arabic_stop_words:
|
53 |
-
clean_txt = clean_txt + word + ' '
|
54 |
-
|
55 |
-
return clean_txt[:-1]
|
56 |
-
|
57 |
-
|
58 |
-
def Remove_unwanted(text):
|
59 |
-
# removing the extra spacing and links
|
60 |
-
|
61 |
-
text = re.sub(r'^https?:\/\/.*[\r\n]*', ' ', text, flags=re.MULTILINE)
|
62 |
-
text = re.sub(r'^http?:\/\/.*[\r\n]*', ' ', text, flags=re.MULTILINE)
|
63 |
-
text = re.sub(r"http\S+", " ", text)
|
64 |
-
text = re.sub(r"https\S+", " ", text)
|
65 |
-
text = re.sub(r'\s+', ' ', text)
|
66 |
-
text = re.sub(r'[a-zA-Z]+', ' ', text)
|
67 |
-
text = re.sub(r"^\s+|\s+$", "", text)
|
68 |
-
text = re.sub(r"(\s\d+)", " ", text)
|
69 |
-
text = re.sub(r"$\d+\W+|\b\d+\b|\W+\d+$", " ", text)
|
70 |
-
text = re.sub(r"\d+", " ", text)
|
71 |
-
text = re.sub(r'[إأٱآا]', 'ا', text)
|
72 |
-
text = re.sub(r'ى', '[ي]', text)
|
73 |
-
text = re.sub(r'ء', '[ؤئ]', text)
|
74 |
-
text = re.sub(r' +', ' ', text)
|
75 |
-
return text
|
76 |
-
|
77 |
-
|
78 |
-
def txt_preprocess(text):
|
79 |
-
text = normalize_text(text)
|
80 |
-
# text = stemming(text)
|
81 |
-
text = remove_stopwords(text)
|
82 |
-
text = remove_punctuations(text)
|
83 |
-
text = Remove_unwanted(text)
|
84 |
-
return text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/Database.py
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
from firebase_admin import credentials
|
2 |
-
from firebase_admin import firestore
|
3 |
-
import threading
|
4 |
-
from firebase_admin import db
|
5 |
-
# Import the Firebase Admin SDK
|
6 |
-
import firebase_admin
|
7 |
-
from datetime import datetime
|
8 |
-
import time
|
9 |
-
import Cleaning
|
10 |
-
from collections import Counter
|
11 |
-
def current_milli_time():
|
12 |
-
return round(time.time() * 1000)
|
13 |
-
|
14 |
-
|
15 |
-
import Server.Classes as Classes
|
16 |
-
db=firestore
|
17 |
-
# Firebase ininlaziton
|
18 |
-
cred = credentials.Certificate(
|
19 |
-
"text-to-emotions-firebase-adminsdk-8isbn-dffbdf01e8.json")
|
20 |
-
firebase_admin.initialize_app(cred)
|
21 |
-
|
22 |
-
# for doc in docs:
|
23 |
-
# print(f"{doc.id} => {doc.to_dict()}")
|
24 |
-
all_reviews = db.collection("complaints")
|
25 |
-
# Create a query against the collection
|
26 |
-
today_date = current_milli_time()
|
27 |
-
documents_to_summarize = all_reviews.where("summary","==",None).where("date",'==',today_date).get()
|
28 |
-
feedbacks = db.collection("feedbacks").where("feedbacks","==",False)
|
29 |
-
|
30 |
-
|
31 |
-
documents=[]
|
32 |
-
#get all documents for today that have no summary
|
33 |
-
def get_all_document():
|
34 |
-
for doc in documents_to_summarize:
|
35 |
-
document =Classes.Shakwa.from_dict(source=doc.to_dict())
|
36 |
-
documents.append(document)
|
37 |
-
return documents
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
def get_num_of_words():
|
42 |
-
for doc in documents_to_summarize:
|
43 |
-
print(len(doc.complaintbody))
|
44 |
-
|
45 |
-
def shakwa_common_words():
|
46 |
-
for doc in documents_to_summarize:
|
47 |
-
words_in_docs=" ".join(doc)
|
48 |
-
words_in_docs = Cleaning.txt_preprocess(words_in_docs)
|
49 |
-
most_common_words=Counter(words_in_docs)
|
50 |
-
return dict(most_common_words)
|
51 |
-
|
52 |
-
def feedback_common_words():
|
53 |
-
for feedback in feedbacks:
|
54 |
-
words_in_feedback=" ".join(feedback)
|
55 |
-
words_in_feedback = Cleaning.txt_preprocess(words_in_feedback)
|
56 |
-
most_common_words=Counter(words_in_feedback)
|
57 |
-
return dict(most_common_words)
|
58 |
-
|
59 |
-
def get_most_common_places():
|
60 |
-
dic_place_count={}
|
61 |
-
governorates=all_reviews.governorate
|
62 |
-
for gov in governorates:
|
63 |
-
if gov not in dic_place_count.keys():
|
64 |
-
dic_place_count[gov]=0
|
65 |
-
else :
|
66 |
-
dic_place_count[gov]+=1
|
67 |
-
return dic_place_count
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/arabic_stop_words.txt
DELETED
@@ -1,622 +0,0 @@
|
|
1 |
-
آض
|
2 |
-
آمينَ
|
3 |
-
آه
|
4 |
-
انا
|
5 |
-
آهاً
|
6 |
-
آي
|
7 |
-
أب
|
8 |
-
أجل
|
9 |
-
أجمع
|
10 |
-
أخ
|
11 |
-
أخذ
|
12 |
-
أصبح
|
13 |
-
أضحى
|
14 |
-
أقبل
|
15 |
-
أقل
|
16 |
-
أكثر
|
17 |
-
ألا
|
18 |
-
أم
|
19 |
-
أما
|
20 |
-
أمامك
|
21 |
-
أمامكَ
|
22 |
-
أمسى
|
23 |
-
أمّا
|
24 |
-
أن
|
25 |
-
أنا
|
26 |
-
أنت
|
27 |
-
أنتم
|
28 |
-
أنتما
|
29 |
-
أنتن
|
30 |
-
أنتِ
|
31 |
-
أنشأ
|
32 |
-
أنّى
|
33 |
-
أو
|
34 |
-
أوشك
|
35 |
-
أولئك
|
36 |
-
أولئكم
|
37 |
-
أولاء
|
38 |
-
أولالك
|
39 |
-
أوّهْ
|
40 |
-
أي
|
41 |
-
أيا
|
42 |
-
أين
|
43 |
-
أينما
|
44 |
-
أيّ
|
45 |
-
أَنَّ
|
46 |
-
أَيُّ
|
47 |
-
أُفٍّ
|
48 |
-
إذ
|
49 |
-
إذا
|
50 |
-
إذاً
|
51 |
-
إذما
|
52 |
-
إذن
|
53 |
-
إلى
|
54 |
-
إليكم
|
55 |
-
إليكما
|
56 |
-
إليكنّ
|
57 |
-
إليكَ
|
58 |
-
إلَيْكَ
|
59 |
-
إلّا
|
60 |
-
إمّا
|
61 |
-
إن
|
62 |
-
إنّما
|
63 |
-
إي
|
64 |
-
إياك
|
65 |
-
إياكم
|
66 |
-
إياكما
|
67 |
-
إياكن
|
68 |
-
إيانا
|
69 |
-
إياه
|
70 |
-
إياها
|
71 |
-
إياهم
|
72 |
-
إياهما
|
73 |
-
إياهن
|
74 |
-
إياي
|
75 |
-
إيهٍ
|
76 |
-
إِنَّ
|
77 |
-
ا
|
78 |
-
ابتدأ
|
79 |
-
اثر
|
80 |
-
اجل
|
81 |
-
احد
|
82 |
-
اخرى
|
83 |
-
اخلولق
|
84 |
-
اذا
|
85 |
-
اربعة
|
86 |
-
ارتدّ
|
87 |
-
استحال
|
88 |
-
اطار
|
89 |
-
اعادة
|
90 |
-
اعلنت
|
91 |
-
اف
|
92 |
-
اكثر
|
93 |
-
اكد
|
94 |
-
الألاء
|
95 |
-
الألى
|
96 |
-
الا
|
97 |
-
الاخيرة
|
98 |
-
الان
|
99 |
-
الاول
|
100 |
-
الاولى
|
101 |
-
التى
|
102 |
-
التي
|
103 |
-
الثاني
|
104 |
-
الثانية
|
105 |
-
الذاتي
|
106 |
-
الذى
|
107 |
-
الذي
|
108 |
-
الذين
|
109 |
-
السابق
|
110 |
-
الف
|
111 |
-
اللائي
|
112 |
-
اللاتي
|
113 |
-
اللتان
|
114 |
-
اللتيا
|
115 |
-
اللتين
|
116 |
-
اللذان
|
117 |
-
اللذين
|
118 |
-
اللواتي
|
119 |
-
الماضي
|
120 |
-
المقبل
|
121 |
-
الوقت
|
122 |
-
الى
|
123 |
-
اليوم
|
124 |
-
اما
|
125 |
-
امام
|
126 |
-
امس
|
127 |
-
ان
|
128 |
-
انبرى
|
129 |
-
انقلب
|
130 |
-
انه
|
131 |
-
انها
|
132 |
-
او
|
133 |
-
اول
|
134 |
-
اي
|
135 |
-
ايار
|
136 |
-
ايام
|
137 |
-
ايضا
|
138 |
-
ب
|
139 |
-
بات
|
140 |
-
باسم
|
141 |
-
بان
|
142 |
-
بخٍ
|
143 |
-
برس
|
144 |
-
بسبب
|
145 |
-
بسّ
|
146 |
-
بشكل
|
147 |
-
بضع
|
148 |
-
بطآن
|
149 |
-
بعد
|
150 |
-
بعض
|
151 |
-
بك
|
152 |
-
بكم
|
153 |
-
بكما
|
154 |
-
بكن
|
155 |
-
بل
|
156 |
-
بلى
|
157 |
-
بما
|
158 |
-
بماذا
|
159 |
-
بمن
|
160 |
-
بن
|
161 |
-
بنا
|
162 |
-
به
|
163 |
-
بها
|
164 |
-
بي
|
165 |
-
بيد
|
166 |
-
بين
|
167 |
-
بَسْ
|
168 |
-
بَلْهَ
|
169 |
-
بِئْسَ
|
170 |
-
تانِ
|
171 |
-
تانِك
|
172 |
-
تبدّل
|
173 |
-
تجاه
|
174 |
-
تحوّل
|
175 |
-
تلقاء
|
176 |
-
تلك
|
177 |
-
تلكم
|
178 |
-
تلكما
|
179 |
-
تم
|
180 |
-
تينك
|
181 |
-
تَيْنِ
|
182 |
-
تِه
|
183 |
-
تِي
|
184 |
-
ثلاثة
|
185 |
-
ثم
|
186 |
-
ثمّ
|
187 |
-
ثمّة
|
188 |
-
ثُمَّ
|
189 |
-
جعل
|
190 |
-
جلل
|
191 |
-
جميع
|
192 |
-
جير
|
193 |
-
حار
|
194 |
-
حاشا
|
195 |
-
حاليا
|
196 |
-
حاي
|
197 |
-
حتى
|
198 |
-
حرى
|
199 |
-
حسب
|
200 |
-
حم
|
201 |
-
حوالى
|
202 |
-
حول
|
203 |
-
حيث
|
204 |
-
حيثما
|
205 |
-
حين
|
206 |
-
حيَّ
|
207 |
-
حَبَّذَا
|
208 |
-
حَتَّى
|
209 |
-
حَذارِ
|
210 |
-
خلا
|
211 |
-
خلال
|
212 |
-
دون
|
213 |
-
دونك
|
214 |
-
ذا
|
215 |
-
ذات
|
216 |
-
ذاك
|
217 |
-
ذانك
|
218 |
-
ذانِ
|
219 |
-
ذلك
|
220 |
-
ذلكم
|
221 |
-
ذلكما
|
222 |
-
ذلكن
|
223 |
-
ذو
|
224 |
-
ذوا
|
225 |
-
ذواتا
|
226 |
-
ذواتي
|
227 |
-
ذيت
|
228 |
-
ذينك
|
229 |
-
ذَيْنِ
|
230 |
-
ذِه
|
231 |
-
ذِي
|
232 |
-
راح
|
233 |
-
رجع
|
234 |
-
رويدك
|
235 |
-
ريث
|
236 |
-
رُبَّ
|
237 |
-
زيارة
|
238 |
-
سبحان
|
239 |
-
سرعان
|
240 |
-
سنة
|
241 |
-
سنوات
|
242 |
-
سوف
|
243 |
-
سوى
|
244 |
-
سَاءَ
|
245 |
-
سَاءَمَا
|
246 |
-
شبه
|
247 |
-
شخصا
|
248 |
-
شرع
|
249 |
-
شَتَّانَ
|
250 |
-
صار
|
251 |
-
صباح
|
252 |
-
صفر
|
253 |
-
صهٍ
|
254 |
-
صهْ
|
255 |
-
ضد
|
256 |
-
ضمن
|
257 |
-
طاق
|
258 |
-
طالما
|
259 |
-
طفق
|
260 |
-
طَق
|
261 |
-
ظلّ
|
262 |
-
عاد
|
263 |
-
عام
|
264 |
-
عاما
|
265 |
-
عامة
|
266 |
-
عدا
|
267 |
-
عدة
|
268 |
-
عدد
|
269 |
-
عدم
|
270 |
-
عسى
|
271 |
-
عشر
|
272 |
-
عشرة
|
273 |
-
علق
|
274 |
-
على
|
275 |
-
عليك
|
276 |
-
عليه
|
277 |
-
عليها
|
278 |
-
علًّ
|
279 |
-
عن
|
280 |
-
عند
|
281 |
-
عندما
|
282 |
-
عوض
|
283 |
-
عين
|
284 |
-
عَدَسْ
|
285 |
-
عَمَّا
|
286 |
-
غدا
|
287 |
-
غير
|
288 |
-
ف
|
289 |
-
فان
|
290 |
-
فلان
|
291 |
-
فو
|
292 |
-
فى
|
293 |
-
في
|
294 |
-
فيم
|
295 |
-
فيما
|
296 |
-
فيه
|
297 |
-
فيها
|
298 |
-
قال
|
299 |
-
قام
|
300 |
-
قبل
|
301 |
-
قد
|
302 |
-
قطّ
|
303 |
-
قلما
|
304 |
-
قوة
|
305 |
-
كأنّما
|
306 |
-
كأين
|
307 |
-
كأيّ
|
308 |
-
كأيّن
|
309 |
-
كاد
|
310 |
-
كان
|
311 |
-
كانت
|
312 |
-
كذا
|
313 |
-
كذلك
|
314 |
-
كرب
|
315 |
-
كل
|
316 |
-
كلا
|
317 |
-
كلاهما
|
318 |
-
كلتا
|
319 |
-
كلم
|
320 |
-
كليكما
|
321 |
-
كليهما
|
322 |
-
كلّما
|
323 |
-
كلَّا
|
324 |
-
كم
|
325 |
-
كما
|
326 |
-
كي
|
327 |
-
كيت
|
328 |
-
كيف
|
329 |
-
كيفما
|
330 |
-
كَأَنَّ
|
331 |
-
كِخ
|
332 |
-
لئن
|
333 |
-
لا
|
334 |
-
لات
|
335 |
-
لاسيما
|
336 |
-
لدن
|
337 |
-
لدى
|
338 |
-
لعمر
|
339 |
-
لقاء
|
340 |
-
لك
|
341 |
-
لكم
|
342 |
-
لكما
|
343 |
-
لكن
|
344 |
-
لكنَّما
|
345 |
-
لكي
|
346 |
-
لكيلا
|
347 |
-
للامم
|
348 |
-
لم
|
349 |
-
لما
|
350 |
-
لمّا
|
351 |
-
لن
|
352 |
-
لنا
|
353 |
-
له
|
354 |
-
لها
|
355 |
-
لو
|
356 |
-
لوكالة
|
357 |
-
لولا
|
358 |
-
لوما
|
359 |
-
لي
|
360 |
-
لَسْتَ
|
361 |
-
لَسْتُ
|
362 |
-
لَسْتُم
|
363 |
-
لَسْتُمَا
|
364 |
-
لَسْتُنَّ
|
365 |
-
لَسْتِ
|
366 |
-
لَسْنَ
|
367 |
-
لَعَلَّ
|
368 |
-
لَكِنَّ
|
369 |
-
لَيْتَ
|
370 |
-
لَيْسَ
|
371 |
-
لَيْسَا
|
372 |
-
لَيْسَتَا
|
373 |
-
لَيْسَتْ
|
374 |
-
لَيْسُوا
|
375 |
-
لَِسْنَا
|
376 |
-
ما
|
377 |
-
ماانفك
|
378 |
-
مابرح
|
379 |
-
مادام
|
380 |
-
ماذا
|
381 |
-
مازال
|
382 |
-
مافتئ
|
383 |
-
مايو
|
384 |
-
متى
|
385 |
-
مثل
|
386 |
-
مذ
|
387 |
-
مساء
|
388 |
-
مع
|
389 |
-
معاذ
|
390 |
-
مقابل
|
391 |
-
مكانكم
|
392 |
-
مكانكما
|
393 |
-
مكانكنّ
|
394 |
-
مكانَك
|
395 |
-
مليار
|
396 |
-
مليون
|
397 |
-
مما
|
398 |
-
ممن
|
399 |
-
من
|
400 |
-
منذ
|
401 |
-
منها
|
402 |
-
مه
|
403 |
-
مهما
|
404 |
-
مَنْ
|
405 |
-
مِن
|
406 |
-
نحن
|
407 |
-
نحو
|
408 |
-
نعم
|
409 |
-
نفس
|
410 |
-
نفسه
|
411 |
-
نهاية
|
412 |
-
نَخْ
|
413 |
-
نِعِمّا
|
414 |
-
نِعْمَ
|
415 |
-
ها
|
416 |
-
هاؤم
|
417 |
-
هاكَ
|
418 |
-
هاهنا
|
419 |
-
هبّ
|
420 |
-
هذا
|
421 |
-
هذه
|
422 |
-
هكذا
|
423 |
-
هل
|
424 |
-
هلمَّ
|
425 |
-
هلّا
|
426 |
-
هم
|
427 |
-
هما
|
428 |
-
هن
|
429 |
-
هنا
|
430 |
-
هناك
|
431 |
-
هنالك
|
432 |
-
هو
|
433 |
-
هي
|
434 |
-
هيا
|
435 |
-
هيت
|
436 |
-
هيّا
|
437 |
-
هَؤلاء
|
438 |
-
هَاتانِ
|
439 |
-
هَاتَيْنِ
|
440 |
-
هَاتِه
|
441 |
-
هَاتِي
|
442 |
-
هَجْ
|
443 |
-
هَذا
|
444 |
-
هَذانِ
|
445 |
-
هَذَيْنِ
|
446 |
-
هَذِه
|
447 |
-
هَذِي
|
448 |
-
هَيْهَاتَ
|
449 |
-
و
|
450 |
-
وا
|
451 |
-
واحد
|
452 |
-
واضاف
|
453 |
-
واضافت
|
454 |
-
واكد
|
455 |
-
وان
|
456 |
-
واهاً
|
457 |
-
واوضح
|
458 |
-
وراءَك
|
459 |
-
وفي
|
460 |
-
وقال
|
461 |
-
وقالت
|
462 |
-
وقد
|
463 |
-
وقف
|
464 |
-
وكان
|
465 |
-
وكانت
|
466 |
-
ولا
|
467 |
-
ولم
|
468 |
-
ومن
|
469 |
-
وهو
|
470 |
-
وهي
|
471 |
-
ويكأنّ
|
472 |
-
وَيْ
|
473 |
-
وُشْكَانَ
|
474 |
-
يكون
|
475 |
-
يمكن
|
476 |
-
يوم
|
477 |
-
أيّان
|
478 |
-
من
|
479 |
-
في
|
480 |
-
على
|
481 |
-
و
|
482 |
-
فى
|
483 |
-
يا
|
484 |
-
عن
|
485 |
-
مع
|
486 |
-
ان
|
487 |
-
هو
|
488 |
-
علي
|
489 |
-
ما
|
490 |
-
اللي
|
491 |
-
كل
|
492 |
-
بعد
|
493 |
-
ده
|
494 |
-
اليوم
|
495 |
-
أن
|
496 |
-
يوم
|
497 |
-
انا
|
498 |
-
إلى
|
499 |
-
كان
|
500 |
-
ايه
|
501 |
-
اللى
|
502 |
-
الى
|
503 |
-
دي
|
504 |
-
بين
|
505 |
-
انت
|
506 |
-
أنا
|
507 |
-
حتى
|
508 |
-
لما
|
509 |
-
فيه
|
510 |
-
هذا
|
511 |
-
واحد
|
512 |
-
احنا
|
513 |
-
اي
|
514 |
-
كده
|
515 |
-
إن
|
516 |
-
او
|
517 |
-
أو
|
518 |
-
علي��
|
519 |
-
ف
|
520 |
-
دى
|
521 |
-
مين
|
522 |
-
الي
|
523 |
-
كانت
|
524 |
-
أمام
|
525 |
-
زي
|
526 |
-
يكون
|
527 |
-
خلال
|
528 |
-
ع
|
529 |
-
كنت
|
530 |
-
هي
|
531 |
-
فيها
|
532 |
-
عند
|
533 |
-
التي
|
534 |
-
الذي
|
535 |
-
قال
|
536 |
-
هذه
|
537 |
-
قد
|
538 |
-
انه
|
539 |
-
ريتويت
|
540 |
-
بعض
|
541 |
-
أول
|
542 |
-
ايه
|
543 |
-
الان
|
544 |
-
أي
|
545 |
-
منذ
|
546 |
-
عليها
|
547 |
-
له
|
548 |
-
ال
|
549 |
-
تم
|
550 |
-
ب
|
551 |
-
دة
|
552 |
-
عليك
|
553 |
-
اى
|
554 |
-
كلها
|
555 |
-
اللتى
|
556 |
-
هى
|
557 |
-
دا
|
558 |
-
انك
|
559 |
-
وهو
|
560 |
-
ومن
|
561 |
-
منك
|
562 |
-
نحن
|
563 |
-
زى
|
564 |
-
أنت
|
565 |
-
انهم
|
566 |
-
معانا
|
567 |
-
حتي
|
568 |
-
وانا
|
569 |
-
عنه
|
570 |
-
إلي
|
571 |
-
ونحن
|
572 |
-
وانت
|
573 |
-
منكم
|
574 |
-
وان
|
575 |
-
معاهم
|
576 |
-
معايا
|
577 |
-
وأنا
|
578 |
-
عنها
|
579 |
-
إنه
|
580 |
-
اني
|
581 |
-
معك
|
582 |
-
اننا
|
583 |
-
فيهم
|
584 |
-
د
|
585 |
-
انتا
|
586 |
-
عنك
|
587 |
-
وهى
|
588 |
-
معا
|
589 |
-
آن
|
590 |
-
انتي
|
591 |
-
وأنت
|
592 |
-
وإن
|
593 |
-
ومع
|
594 |
-
وعن
|
595 |
-
معاكم
|
596 |
-
معاكو
|
597 |
-
معاها
|
598 |
-
وعليه
|
599 |
-
وانتم
|
600 |
-
وانتي
|
601 |
-
¿
|
602 |
-
|
|
603 |
-
فين
|
604 |
-
كله
|
605 |
-
عنده
|
606 |
-
علشان
|
607 |
-
للي
|
608 |
-
كدا
|
609 |
-
لكل
|
610 |
-
فيك
|
611 |
-
بييني وبينك
|
612 |
-
فكك
|
613 |
-
بيننا
|
614 |
-
جوا
|
615 |
-
الاخر
|
616 |
-
دول
|
617 |
-
انتو
|
618 |
-
خالص
|
619 |
-
طب
|
620 |
-
بجد
|
621 |
-
بتاع
|
622 |
-
عشان
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/main.py
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
from fastapi import FastAPI,status,HTTPException
|
2 |
-
from .models import lr
|
3 |
-
import schemas
|
4 |
-
import Database
|
5 |
-
import models
|
6 |
-
import Cleaning
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
app=FastAPI()
|
11 |
-
|
12 |
-
@app.get('/')
|
13 |
-
def index():
|
14 |
-
return "This is the defult page"
|
15 |
-
|
16 |
-
@app.get('/reviews',status_code=status.HTTP_200_OK)
|
17 |
-
def get_reviews():
|
18 |
-
return "Reviews"
|
19 |
-
|
20 |
-
#Porcessing Shakwa
|
21 |
-
@app.post('/predict_summary')
|
22 |
-
async def get_reviews(request : schemas.shakwa):
|
23 |
-
if 'text' in request:
|
24 |
-
return models.modelsummary(request.complaintbody)
|
25 |
-
else:
|
26 |
-
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Missing text value")
|
27 |
-
|
28 |
-
#Porcessing Feedback
|
29 |
-
@app.post('/predict_sentiment')
|
30 |
-
def get_reviews(request : schemas.feedback):
|
31 |
-
if 'text' in request:
|
32 |
-
return models.modelpredict(request.text)
|
33 |
-
else:
|
34 |
-
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Missing mathod value")
|
35 |
-
|
36 |
-
|
37 |
-
#Analysis
|
38 |
-
@app.get('/CommonWords')
|
39 |
-
def get_reviews():
|
40 |
-
data={"Most Common Words":{"انهردا":11,"بكرا":12}}
|
41 |
-
return data
|
42 |
-
|
43 |
-
@app.get('/CommonPlaces')
|
44 |
-
def get_reviews():
|
45 |
-
data={"Most Common Words":{"مدينة نصر":11,"الدقي":12}}
|
46 |
-
return data
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/models.py
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
from keras.preprocessing.text import Tokenizer
|
2 |
-
from tensorflow.keras.utils import to_categorical
|
3 |
-
from tensorflow.keras.models import Sequential, load_model
|
4 |
-
from sklearn.model_selection import train_test_split
|
5 |
-
from transformers import BertTokenizer, AutoModelForSeq2SeqLM, pipeline
|
6 |
-
from arabert.preprocess import ArabertPreprocessor
|
7 |
-
from huggingface_hub import from_pretrained_keras
|
8 |
-
from collections import Counter
|
9 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
10 |
-
from .Cleaning import *
|
11 |
-
import threading
|
12 |
-
|
13 |
-
# Model summury
|
14 |
-
model_name="abdalrahmanshahrour/auto-arabic-summarization"
|
15 |
-
preprocessor = ArabertPreprocessor(model_name="")
|
16 |
-
|
17 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
18 |
-
modelsummary =AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
19 |
-
pipeline1 = pipeline("text2text-generation",model=modelsummary,tokenizer=tokenizer)
|
20 |
-
|
21 |
-
model_sentiment = from_pretrained_keras('MahmoudNasser/GRU-MODEL-EMOTION-AR-TEXT-76jP')
|
22 |
-
|
23 |
-
|
24 |
-
#summary model
|
25 |
-
def modelsummary(data):
|
26 |
-
result = pipeline1(data,
|
27 |
-
pad_token_id= tokenizer.eos_token_id,
|
28 |
-
num_beams=4,
|
29 |
-
repetition_penalty=3.0,
|
30 |
-
max_length=600,
|
31 |
-
length_penalty=.50,
|
32 |
-
no_repeat_ngram_size = 3)[0]['generated_text']
|
33 |
-
result = remove_punctuations(result)
|
34 |
-
return { 'summary':result}
|
35 |
-
|
36 |
-
|
37 |
-
#Sentiment model
|
38 |
-
def modelpredict(data):
|
39 |
-
data = txt_preprocess(data)
|
40 |
-
pred = model_sentiment.predict(pd.Series([data]))
|
41 |
-
return {'anger': float(pred[0][0]), 'sadness': float(pred[0][1]), 'joy': float(pred[0][2]), 'surprise': float(pred[0][3]),
|
42 |
-
'love': float(pred[0][4]), 'sympathy': float(pred[0][5]), 'fear': float(pred[0][6])}
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/requirements.txt
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
requests
|
2 |
-
keras
|
3 |
-
tensorflow
|
4 |
-
farasapy
|
5 |
-
Arabic-Stopwords
|
6 |
-
swifter
|
7 |
-
pyarabic
|
8 |
-
lime
|
9 |
-
huggingface_hub
|
10 |
-
nltk
|
11 |
-
transformers
|
12 |
-
arabert
|
13 |
-
torch==1.13.1
|
14 |
-
fastapi==0.74.*
|
15 |
-
requests==2.27.*
|
16 |
-
sentencepiece==0.1.*
|
17 |
-
firebase-admin
|
18 |
-
uvicorn[standard]==0.17.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/schemas.py
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
from pydantic import BaseModel
|
2 |
-
|
3 |
-
|
4 |
-
class shakwa(BaseModel):
|
5 |
-
address:str
|
6 |
-
complaintbody:str
|
7 |
-
date:int
|
8 |
-
governorate:str
|
9 |
-
doc_id:str
|
10 |
-
organization:str
|
11 |
-
summary:str
|
12 |
-
title:str
|
13 |
-
user_id:str
|
14 |
-
|
15 |
-
|
16 |
-
class feedback(BaseModel):
|
17 |
-
Date:str
|
18 |
-
Uid:int
|
19 |
-
text:str
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/test.py
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
import requests
|
2 |
-
import schemas
|
3 |
-
|
4 |
-
Feedback=schemas.feedback(Date="Mahmoud",Uid=12,text="Nasser")
|
5 |
-
|
6 |
-
print(Feedback)
|
7 |
-
|
8 |
-
response=requests.post(url="http://localhost:8000/req",data=Feedback)
|
9 |
-
print(response.json())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Server/text-to-emotions-firebase-adminsdk-8isbn-dffbdf01e8.json
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"type": "service_account",
|
3 |
-
"project_id": "text-to-emotions",
|
4 |
-
"private_key_id": "dffbdf01e831117f58d7819ea7e3fefd524d158e",
|
5 |
-
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCxNxv8UBMZUz4/\nJr7kSt4JANPsKDwYo+LZBsjgfYPHwYDLhI9GJsulORoeprPDM6Qsu0acIHHMiYxz\ncg2eAALKgMYEAt9Mz4FcMv2dvxL6M5YBgpYHoH1k90QvgViJPjeGSP7q3JrF5xvv\n3+BJYG641T20WT3Vm6/DIB6ktmNaG0iQXzZfrJypLBHlozqfSd80Stg1ho4BrQa9\nQ6h22tAQQFOza4oIHe+enFgDbaEhKtVEB1GUbNFtpAQa4onTTNdI1r8EFrx3ELzS\nCID72MGNf4XTfoq7r2rAFR5ZlruIKRqcB9Qno6i+BnVbt4kk/7lJ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AbARDF9Fuu2NKfWwv5PTqDe/6jAkCgYAs4hNcx8qpqPFOo5fmuLlA\nXj3p4ToKyJ/S+aHaFX8KBAnVSNVgUhi0hsWKCFkPuDOu8TDlMwzpKXvIKdc1HTLR\nyClbE9Xejr/zPDQoClOOWg4hgHgbajQTtUxQ4DSZK7MWaoh78NXqRQoiKhE+yV4v\nmPdQWjmbh9yCWt3xQKUJaQ==\n-----END PRIVATE KEY-----\n",
|
6 |
-
"client_email": "[email protected]",
|
7 |
-
"client_id": "100821195059447963966",
|
8 |
-
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
9 |
-
"token_uri": "https://oauth2.googleapis.com/token",
|
10 |
-
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
11 |
-
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-8isbn%40text-to-emotions.iam.gserviceaccount.com",
|
12 |
-
"universe_domain": "googleapis.com"
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|