как ne_chunk файлы в nltk? - PullRequest
       5

как ne_chunk файлы в nltk?

0 голосов
/ 21 октября 2018
import nltk    
file_content = open("C:\headlines.txt").read()    
tokens = nltk.word_tokenize(file_content)    
print(tokens)

Выход

['West', 'Bengal', 'govt', '.', 'extends', 'food', 'security', 'to', '8.5',
 'crore', 'people', ':', 'Mamata', 'Govt', 'committed', 'to', 'implementing', 
 'SC', 'verdict', 'on', 'Sabarimala', ',', 'says', 'Kerala', 'CM', 'Pinarayi',
 'Vijayan', 'Polling', 'under', 'way', 'for', 'last', 'phase', 'of',
 'municipal', 'polls', 'in', 'Jammu', 'and', 'Kashmir', '.']
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...