Skip to content
This repository was archived by the owner on Dec 28, 2018. It is now read-only.

Commit b680498

Browse files
authored
Update feature1.py
1 parent 760049e commit b680498

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

feature1.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
tridict={}
1616

1717
def getSentiStrength(w):
18-
stemmer = SnowballStemmer("english",ignore_stopwords=True)
19-
w = stemmer.stem(w)
18+
try:
19+
stemmer = SnowballStemmer("english",ignore_stopwords=True)
20+
w = stemmer.stem(w)
21+
except:
22+
w = w
2023
sentidict = {}
2124
with open('senti.txt','r') as file2:
2225
for line in file2:

0 commit comments

Comments
 (0)