0
推荐
1930
阅读

NLP之nltk学习笔记2

请先加载##词链表sent1=['call','me','David','.']sent1​len(sent1)​print(sent2)['The', 'family', 'of', 'Dashwood', 'had', 'long', 'been', 'settled', 'in', 'Sussex', '.'] In [28]:print(sent3)['In', 'the', 'beginning', 'God', 'created', 'the', 'heaven', 'and', 'the', 'earth', '.'] In [45]:#...

发表了文章 • 2017-04-16 23:50 • 0 条评论

0
推荐
2767
阅读

NLP之nltk学习笔记1

import nltkIn [3]:nltk.download()showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml Out[3]:TrueIn [8]:#搜索文本from nltk.book import *text1.concordance('monstrous')#搜索单词*** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1,...

发表了文章 • 2017-04-11 23:47 • 0 条评论