【发布时间】:2015-10-25 19:43:00
【问题描述】:
我正在使用 nltk PunktSentenceTokenizer() 在 python 中为文本分段句子。但是,有很多长句以枚举的方式出现,我需要在这种情况下获取子句。
例子:
The api allows the user to achieve following goals: (a) aXXXXXX ,(b)bXXXX, (c) cXXXXX.
所需的输出是:
"The api allows the user to achieve following goals aXXXXX. "、"The api allows the user to achieve following goals bXXXXX." 和 "The api allows the user to achieve following goals cXXXXX. "
我怎样才能实现这个目标?
【问题讨论】:
-
我猜你不希望
The required output would be成为实际输出的一部分? -
是的,你是对的。我修好了。
标签: python nltk text-segmentation