function summary of nltk in python
来源:互联网 发布:淘宝卖衣服从哪进货 编辑:程序博客网 时间:2024/06/10 21:16
1. re.findall(regexp,word):find the characters in word by the pattern 'regexp'
2. nltk.regexp_tokenize(text,pattern): find the characters in text by the pattern 'pattern'
3. re.split(r',',string):divide the string by ','
4. text.concordance('hello'):find 'hello' in text and output the at line
5. text.similar('hello'):find the similar attribute like 'hello' and output the word
6. sorted(word_list):sort the words in word_list
7. set(word_list):delete the words
8. word_list.append('hello'):add 'hello' to the word_list
9. len(word_list):count the words number
10. word_list.count('hello'):count the number of 'hello' in the word_list
11. word_list.index('hello'):return the index of the first 'hello' in the word_list
12. fdist = FreqDist(word_list):calculate the words number and create the word:number pairs
13. nltk.***.words('fileid'):get the content of 'fileid' in type of words
14. ***.fileids():return all the fileid in the language library '***'
15. text = nltk.Text(wordlist):convert the wordlist into the text mode
16. PlaintextCorpusReader(path,'.*'):get all the file content in the path
17. nltk.word_tokenize(string):divide the string into wordlist
18. nltk.sent_tokenize(string):divide the string into sent
19. the for used in nltk
for item in s : traverse elements in s
for item in set(s) : traverse elements in s and no repeat
for item in sort(s) ; traverse elements in s by order
for item in reversed(s) : traverse elements in s by reversed order
for item in set(s).difference(t) : traverse elements in s but not in t
for item in random.shuffle(s) : traverse elements in s by random order
2. nltk.regexp_tokenize(text,pattern): find the characters in text by the pattern 'pattern'
3. re.split(r',',string):divide the string by ','
4. text.concordance('hello'):find 'hello' in text and output the at line
5. text.similar('hello'):find the similar attribute like 'hello' and output the word
6. sorted(word_list):sort the words in word_list
7. set(word_list):delete the words
8. word_list.append('hello'):add 'hello' to the word_list
9. len(word_list):count the words number
10. word_list.count('hello'):count the number of 'hello' in the word_list
11. word_list.index('hello'):return the index of the first 'hello' in the word_list
12. fdist = FreqDist(word_list):calculate the words number and create the word:number pairs
13. nltk.***.words('fileid'):get the content of 'fileid' in type of words
14. ***.fileids():return all the fileid in the language library '***'
15. text = nltk.Text(wordlist):convert the wordlist into the text mode
16. PlaintextCorpusReader(path,'.*'):get all the file content in the path
17. nltk.word_tokenize(string):divide the string into wordlist
18. nltk.sent_tokenize(string):divide the string into sent
19. the for used in nltk
for item in s : traverse elements in s
for item in set(s) : traverse elements in s and no repeat
for item in sort(s) ; traverse elements in s by order
for item in reversed(s) : traverse elements in s by reversed order
for item in set(s).difference(t) : traverse elements in s but not in t
for item in random.shuffle(s) : traverse elements in s by random order
1
上一篇:正则表达式
下一篇:spark RDD
相关热门文章
- 欢迎pythonin在ChinaUnix博客...
- openstack的liberty版本
- 微信开发服务器验证代码python...
- 欢迎pythonTester在ChinaUnix...
- bootstrap table 的onClickCel...
- python 自动化测试平台 Robot ...
- python 自动化测试平台 Robot ...
- python snmp 自动化2-在python...
- 自动化测试详细测试计划 模板...
- python snmp 自动化3-修改pyth...
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
0 0
- function summary of nltk in python
- python built-in function summary
- underlines in function of python
- the argument of function in python
- nltk function
- Summary of English in December
- Summary of english in may
- Summary of English in July
- Summary of English in July
- The study of parameter of function in Python(20170908)
- the built-in function of range() in python
- the built-in function of eval() in python
- the built-in function of reduce in python
- a summary of python crawler
- The study of recursive function in Python(20170910)
- The study of Higher-order function in Python(20170913)
- The study of map() and reduce() function in Python(20170913)
- summary with him in half of year
- android studio logcat异常调试信息解析错误方法
- file operate in python (open write read close )
- I/O of python (INPUT / OUTPUT)
- 正则表达式
- sublime text2对编译无反应的解决办法
- function summary of nltk in python
- spark RDD
- android 存储结构与存储方法
- Spark 中算子功能与分类介绍
- spark standalone mode
- Android 随笔杂记
- Android 中 SQLite 的应用总结
- set up spark cluster -- create VM
- setup cluster -- ssh to each other with no key ssh免密钥登陆配置
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
橡皮筋原料
巧用橡皮筋
橡皮筋男鞋
医疗橡皮筋
办公用橡皮筋
橡皮筋袖口
橡皮筋裤子
橡皮筋方法
橡皮筋穿透魔术揭秘
戒指橡皮筋魔术揭秘
橡皮筋戒指魔术揭秘
皇家橡皮筋实体店
橡皮筋穿手指魔术
白色橡皮筋
大橡皮筋
橡皮筋材料
橡皮管
熊博士橡皮糖
暗矛橡皮糖
橡皮糖图片
橡皮糖做法
橡皮糖是什么做的
果汁糖
橡皮糖的危害
橡皮糖牌子
橡皮糖是用什么做的
trolli口力橡皮糖
橡皮的图片
橡皮章洗章
橡皮章保存
橡皮胶
橡皮胶玩具
橡胶型密封胶
带胶橡胶垫
中胶橡胶
橡胶减震胶垫
杂胶橡胶颗粒
橡胶海绵胶条
橡胶止水胶条
橡胶包胶
橡胶用什么胶