Skip to content

Commit

Permalink
Improve tokenization
Browse files Browse the repository at this point in the history
  • Loading branch information
am9zZWY committed Jul 17, 2024
1 parent dfccdc4 commit bbbed16
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions engine/summarize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from gensim.summarization import summarize

# Input text to be summarized
input_text = """
Your input text goes here. It can be a long paragraph or multiple paragraphs.
"""

# Generate the summary using TextRank algorithm
summary = summarize(input_text, ratio=0.3) # You can adjust the ratio parameter based on the summary length you desire

# Output the summary
print("Original Text:")
print(input_text)
print("\nSummary:")
print(summary)

0 comments on commit bbbed16

Please sign in to comment.