You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in a lot of junk, not accounting for apostrophes and other punctuation. It could probably be improved using nltk or just being more thoughtful?
text=open(path).read().lower().replace("\n", " ")
# Split into sentences (this could be improved! Using nltk?)sentences=re.split("[.?!]", text);
# Split each sentence into words! (this could also be improved!)final_sentences= []
forsentenceinsentences:
words=re.split("\W+", sentence)
final_sentences.append(words)
The text was updated successfully, but these errors were encountered:
This results in a lot of junk, not accounting for apostrophes and other punctuation. It could probably be improved using nltk or just being more thoughtful?
The text was updated successfully, but these errors were encountered: