【发布时间】:2017-10-23 08:05:51
【问题描述】:
我有以下字符向量:
"This is a very long character vector. Why is it so long? I want to split this vector into senteces by using e.g. strssplit. Can someone help me? That would be nice?"
我想使用以下模式将其拆分为句子(即句点 - 空格 - 大写字母):
"This is a very long character vector."
"Why is it so long? I want to split this vector into senteces by using e.g. strssplit."
"Can someone help me?"
"That would be nice?"
因此,缩写后的句点不应是新句子。我想在 R 中使用正则表达式来做到这一点。
有人可以帮我吗?
【问题讨论】:
-
问号呢?你以两种不同的方式分道扬镳?