From 3fb9249ca6d01be3ae33c2b61fcf186d20b0f276 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Thu, 28 May 2020 13:48:26 +0200 Subject: [PATCH] all tokenized words --- website/faceapp.html | 60 ++++++++++++++++++++++---------------------- website/faceapp.py | 8 +++--- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/website/faceapp.html b/website/faceapp.html index 618286b..82bbfb2 100644 --- a/website/faceapp.html +++ b/website/faceapp.html @@ -5793,36 +5793,36 @@

Frequent words
-
 agreement (5)
-
 california (2)
-
 section (2)
-
 consumer (2)
-
 services (2)
-
 right (2)
-
 provision (2)
-
 intended (2)
-
 accordance (1)
-
 civil (1)
-
 code (1)
-
 may (1)
-
 report (1)
-
 complaints (1)
-
 complaint (1)
-
 assistance (1)
-
 unit (1)
-
 division (1)
-
 department (1)
-
 affairs (1)
-
 contacting (1)
-
 writing (1)
-
 400 (1)
-
 r (1)
-
 street (1)
-
 sacramento (1)
-
 ca (1)
-
 95814 (1)
-
 telephone (1)
-
 800 (1)
+
 services (69)
+
 agreement (60)
+
 arbitration (42)
+
 content (37)
+
 use (35)
+
 user (28)
+
 claims (28)
+
 may (26)
+
 rights (21)
+
 app (21)
+
 parties (20)
+
 apple (18)
+
 law (17)
+
 applicable (16)
+
 access (15)
+
 copyright (15)
+
 relief (15)
+
 shall (15)
+
 agree (14)
+
 right (14)
+
 acknowledge (13)
+
 subject (12)
+
 limited (12)
+
 u.s. (12)
+
 arbitrator (12)
+
 claim (11)
+
 disputes (11)
+
 rules (11)
+
 legal (10)
+
 person (10)
diff --git a/website/faceapp.py b/website/faceapp.py index 415c353..b427eb5 100644 --- a/website/faceapp.py +++ b/website/faceapp.py @@ -36,8 +36,8 @@ print(''' - - + + @@ -79,8 +79,10 @@ print('') #ToS text print('
') +tokenized_all = [] for paragraph in faceapp_text_list: tokenized = word_tokenize(paragraph) + tokenized_all += tokenized # add to the tokenized_all tagged = pos_tag(tokenized) print('

') for word, pos in tagged: @@ -93,7 +95,7 @@ print('

') #tos top words list print('
Frequent words
') -tokens_without_stopwords = nltk.FreqDist(words.lower() for words in tokenized if words.lower() not in tos_all_stopwords) +tokens_without_stopwords = nltk.FreqDist(words.lower() for words in tokenized_all if words.lower() not in tos_all_stopwords) frequency_word = FreqDist(tokens_without_stopwords) top_words = tokens_without_stopwords.most_common(30)