Commit
·
67478d9
1
Parent(s):
c6a64cf
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ nltk.download('stopwords')
|
|
13 |
# Function to read and preprocess the article
|
14 |
def read_article(article):
|
15 |
sentences = nltk.sent_tokenize(article)
|
16 |
-
sentences = [sentence for sentence in sentences if len(sentence) > 10] #
|
17 |
return sentences
|
18 |
|
19 |
# Function to compute sentence similarity based on cosine similarity
|
|
|
13 |
# Function to read and preprocess the article
|
14 |
def read_article(article):
|
15 |
sentences = nltk.sent_tokenize(article)
|
16 |
+
sentences = [sentence for sentence in sentences if len(sentence) > 10] # filter very short sentences
|
17 |
return sentences
|
18 |
|
19 |
# Function to compute sentence similarity based on cosine similarity
|