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

  • 關於本站
  • 免責聲明