Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -156,9 +156,10 @@ def DispersionPlot(textParty):
|
|
156 |
'''
|
157 |
word_tokens_party = word_tokenize(textParty) #Tokenizing
|
158 |
moby = Text(word_tokens_party)
|
|
|
159 |
word_Lst=[]
|
160 |
for x in range(5):
|
161 |
-
word_Lst.append(
|
162 |
|
163 |
plt.axis('off')
|
164 |
plt.title('Dispersion Plot')
|
|
|
156 |
'''
|
157 |
word_tokens_party = word_tokenize(textParty) #Tokenizing
|
158 |
moby = Text(word_tokens_party)
|
159 |
+
fdistance = FreqDist(word_tokens_party)
|
160 |
word_Lst=[]
|
161 |
for x in range(5):
|
162 |
+
word_Lst.append(fdistance.most_common(5)[x][0])
|
163 |
|
164 |
plt.axis('off')
|
165 |
plt.title('Dispersion Plot')
|