This should be easy but somehow I\'m not quite getting it.
My assignment is:
Write a function sentenceCapitalizer that has one parameter of type
Just because I couldn't find this solution here.
You can use 'sent_tokenize' method from nltk.
import nltk
string = "hello. my name is Joe. what is your name?"
sentences = nltk.sent_tokenize(string)
print (' '.join([s.replace(s[0],s[0].capitalize(),1) for s in sentences]) )
And the output
Hello. My name is Joe. What is your name?