logo
  • 教程列表
  • SO官方文档
  • nltk 入门
    • NLTKs 下载功能
    • 安装或设置
    • 用 Conda 安装 NLTK
    • 随着 NLTK
    • 基本条款
  1. StackOverflow 文档
  2. nltk 教程
  3. nltk 入门
  4. 随着 NLTK

随着 NLTK

Created: November-22, 2018

你可以使用 NLTK(尤其是 nltk.tokenize 包)执行句子边界检测:

import nltk
text = "This is a test. Let's try this sentence boundary detector."
text_output = nltk.tokenize.sent_tokenize(text)
print('text_output: {0}'.format(text_output))

输出:

text_output: ['This is a test.', "Let's try this sentence boundary detector."]
  • 基本条款
  • 用 Conda 安装 NLTK

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明