NLTK使用总结
来源:互联网 发布:学mysql还是sql server 编辑:程序博客网 时间:2024/06/05 20:30
- nltk.tokenize.punkt()
这个class能将text拆分成句子,但是会保留标点符号,比如括号之类的
import nltk.datatext = '''... Punkt knows that the periods in Mr. Smith and Johann S. Bach... do not mark sentence boundaries. And sometimes sentences... can start with non-capitalized words. i is a good variable... name.... '''sent_detector = nltk.data.load('tokenizers/punkt/english.pickle')print('\n-----\n'.join(sent_detector.tokenize(text.strip())))'''...Punkt knows that the periods in Mr. Smith and Johann S. Bachdo not mark sentence boundaries.-----'''
阅读全文
0 0
- NLTK使用总结
- nltk中文语料库使用总结
- NLTK使用
- nltk主要应用总结
- 使用C++调用NLTK
- NLTK学习总结(一)
- (NLP)自然语言处理学习笔记1 NLTK在使用总结
- NLTK
- nltk
- Python安装nltk使用Ngram
- NLTK中使用Stanford parser
- 使用NLTK计算word的相似度
- Python 使用nltk获取TF-IDF
- Python 使用nltk计算词的搭配
- Python的Nltk包安装使用
- 安装和使用NLTK分词和去停词
- 自然语言处理工具 nltk 安装使用
- 使用Python+NLTK实现英文单词词频统计
- 生成指定文件目录下的文件树
- Android 项目构建过程
- Java中this关键字用法
- CVPR 2017 Abstracts Collection
- Hive开发UDF
- NLTK使用总结
- Android源码(1) --- Zygote进程启动流程
- C#程序退出的几种方法
- [刷题]Codeforces Round #412(Div. 2)
- CentOS7使用oneinstack安装全能环境
- Maven初体验
- Android源码(2) --- SystemServer进程启动流程
- Mac安装hadoop伪分布式
- 提高网站流量转化率需要分析的三个指标和要做的两个方面