Spaces:
Running
Running
Daryl Fung
commited on
Commit
·
dec7ce5
1
Parent(s):
1117254
fix bar plot
Browse files- keyphrase_extraction.py +2 -0
- keyword_extraction.py +2 -0
- word.py +2 -0
keyphrase_extraction.py
CHANGED
@@ -37,6 +37,8 @@ def get_top_key_phrases(text, top_n, save_output):
|
|
37 |
plt.figure(figsize=(24, 8))
|
38 |
plt.yticks(fontsize=15)
|
39 |
sns.barplot(data=keyword_df, y='words', x='scores', palette='blend:#7AB,#EDA')
|
|
|
|
|
40 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
41 |
plt.close()
|
42 |
|
|
|
37 |
plt.figure(figsize=(24, 8))
|
38 |
plt.yticks(fontsize=15)
|
39 |
sns.barplot(data=keyword_df, y='words', x='scores', palette='blend:#7AB,#EDA')
|
40 |
+
plt.xlabel("scores", fontsize=15)
|
41 |
+
plt.ylabel("words", fontsize=15)
|
42 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
43 |
plt.close()
|
44 |
|
keyword_extraction.py
CHANGED
@@ -40,6 +40,8 @@ def keyword_extract(doc, kw_model, n_grams, save_output='results/'):
|
|
40 |
plt.figure(figsize=(24, 8))
|
41 |
plt.yticks(fontsize=15)
|
42 |
sns.barplot(data=keyword_df, y='words', x='scores', palette='blend:#7AB,#EDA')
|
|
|
|
|
43 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
44 |
plt.close()
|
45 |
|
|
|
40 |
plt.figure(figsize=(24, 8))
|
41 |
plt.yticks(fontsize=15)
|
42 |
sns.barplot(data=keyword_df, y='words', x='scores', palette='blend:#7AB,#EDA')
|
43 |
+
plt.xlabel("scores", fontsize=15)
|
44 |
+
plt.ylabel("words", fontsize=15)
|
45 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
46 |
plt.close()
|
47 |
|
word.py
CHANGED
@@ -36,6 +36,8 @@ def show_gram_plot(doc, n_grams, top_words=10, save_output='results/'):
|
|
36 |
plt.figure(figsize=(24, 8))
|
37 |
plt.yticks(fontsize=15)
|
38 |
sns.barplot(data=tokens_df, y='word', x='count', palette='blend:#7AB,#EDA')
|
|
|
|
|
39 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
40 |
plt.close()
|
41 |
|
|
|
36 |
plt.figure(figsize=(24, 8))
|
37 |
plt.yticks(fontsize=15)
|
38 |
sns.barplot(data=tokens_df, y='word', x='count', palette='blend:#7AB,#EDA')
|
39 |
+
plt.xlabel("count", fontsize=15)
|
40 |
+
plt.ylabel("word", fontsize=15)
|
41 |
plt.savefig(save_output, dpi=300, bbox_inches="tight")
|
42 |
plt.close()
|
43 |
|