We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cebdb7 commit d818133Copy full SHA for d818133
ch05/classify.py
@@ -54,6 +54,7 @@ def prepare_sent_features():
54
ifnottext:
55
meta[pid]['AvgSentLen'] =meta[pid]['AvgWordLen'] =0
56
else:
57
+text=text.decode('utf-8')
58
sent_lens= [len(nltk.word_tokenize(
59
sent)) forsentinnltk.sent_tokenize(text)]
60
meta[pid]['AvgSentLen'] =np.mean(sent_lens)
0 commit comments