注意这章开始说指定了范围,是是针对英语的,用于中文不是不可以,但有些是不适用的。
这章主要介绍2块内容,都是浅浅的提了一下:
1.马尔可夫模型(Markov Model)
是一种统计模型,广泛应用在语音识别,词性自动标注,音字转换,概率文法等各个自然语言处理等应用领域
举了一个六度空间理论的例子,数据从这里来
https://en.wikipedia.org/wiki/SixDegrees.com
2.The Natural Language Toolkit (NLTK) ,
有本书<NLTK 3.0 documentation Python’s Natural LanguageToolkit>可以参考。
具体实力这个还有点看看, NLTK应用没这么简单了
#3-markovGenerator.py
构建markov字典,根据初始word,根据markov字典 生成 100个字的文档
--------------------
NLTK安装和使用
pip install nltk
>>>import nltk
>>>nltk.download()
d all即可
注意NLTK默认的搜素路径是$HOME/nltk_data
其中panlex_lite有1.6G,单独下载把(可以解压到相应目录),我没用download成功。
总的来说,nltk不提供中文分词,不应该纠结于此,并止步不前,我们完全可以使用其他的中文分词工具,将需要处理的资料分好词,然后再使用nltk进行处理
实例也就是一些频率分布,都比较简单,具体就不说了,等我总结下,再做专门介绍。
一些其他链接:
这页介绍的NLTK相关内容不错
http://blog.csdn.net/huyoo/article/details/12188573
该有的index都有了
Python自然语言处理实践: 在NLTK中使用斯坦福中文分词器
http://www.kuqin.com/shuoit/20141001/342462.html
Which words are most popular? Which words are unusual? Which words are
likely to come after which other words? How are they grouped together? What we aremissing is understanding, to the exten
t that we can, what the words represent.