Я новичок в НЛП. Я пытаюсь токенизировать предложение, используя nlp на python 3.7.Так я использовал следующий код
import nltk
text4="This is the first sentence.A gallon of milk in the U.S. cost
$2.99.Is this the third sentence?Yes,it is!"
x=nltk.sent_tokenize(text4)
x[0]
Я ожидал, что x [0] вернет первое предложение, но я получил
Out[4]: 'This is the first sentence.A gallon of milk in the U.S. cost $2.99.Is this the third sentence?Yes,it is!'
Я что-то не так делаю?