Spaces:
Sleeping
Sleeping
Update keywords_processor.py
Browse files- keywords_processor.py +2 -2
keywords_processor.py
CHANGED
|
@@ -22,7 +22,7 @@ def ngram_generator(main_text, other_texts):
|
|
| 22 |
unique_keywords = list(set(all_keywords))
|
| 23 |
output1_path = os.path.join(os.path.dirname(__file__), "output1.txt")
|
| 24 |
with open(output1_path, 'w', encoding='utf-8') as file:
|
| 25 |
-
for keyword in unique_keywords:
|
| 26 |
file.write(keyword + "\n")
|
| 27 |
output_text = f"Keywords saved to {output1_path}"
|
| 28 |
return ", ".join(sorted(unique_keywords)), output_text
|
|
@@ -33,4 +33,4 @@ if __name__ == "__main__":
|
|
| 33 |
other_texts = sys.argv[2] if len(sys.argv) > 2 else ""
|
| 34 |
keywords, output_text = ngram_generator(main_text, other_texts)
|
| 35 |
print(keywords)
|
| 36 |
-
print(output_text)
|
|
|
|
| 22 |
unique_keywords = list(set(all_keywords))
|
| 23 |
output1_path = os.path.join(os.path.dirname(__file__), "output1.txt")
|
| 24 |
with open(output1_path, 'w', encoding='utf-8') as file:
|
| 25 |
+
for keyword in sorted(unique_keywords):
|
| 26 |
file.write(keyword + "\n")
|
| 27 |
output_text = f"Keywords saved to {output1_path}"
|
| 28 |
return ", ".join(sorted(unique_keywords)), output_text
|
|
|
|
| 33 |
other_texts = sys.argv[2] if len(sys.argv) > 2 else ""
|
| 34 |
keywords, output_text = ngram_generator(main_text, other_texts)
|
| 35 |
print(keywords)
|
| 36 |
+
print(output_text)
|