我有以下段落:
输入:---
“然而,通常缺乏足够可靠的地方、区域和国家土地利用和土地覆盖数据以及提供准确的景观变化估计所需的时间和地理细节。美国地质调查局(U.S.GeologicalSurvey)的EROS数据中心和美国环境保护署(U.S.EnvironmentalProtectionAgency)的景观生态学分部正在合作进行一项为期四年的研究项目,以记录近30年来美国土地覆被变化的类型、分布、速率、驱动因素和后果。该项目使用生态区域框架作为地理分层工具。”
想在新行中分隔每个句子。我正在将“.”替换为“\n”(换行符)。它可以正常工作的句子,但当“美国地质…”这样的事情来了我的脚本,使两个单独的句子,我不想。请提出任何可能的建议
预期输出:——(3句按顺序编号)
1)然而,通常缺乏足够可靠的地方、区域和国家土地利用和土地覆盖数据以及时间和地理细节,以提供准确的景观变化估计。你知道吗
2)美国地质调查局的EROS数据中心和美国环境保护署的景观生态学分会正在合作进行一项为期四年的研究项目,以记录近30年来美国土地覆盖变化的类型、分布、速率、驱动因素和后果。你知道吗
3)该项目使用生态区域框架作为地理分层。你知道吗
当前获得:(7句话)
1)然而,通常缺乏足够可靠的地方、区域和国家土地利用和土地覆盖数据以及时间和地理细节,以提供准确的景观变化估计。你知道吗
2)美国
3)S
4)美国地质调查局EROS数据中心和景观生态学分会
5)S
6)环境保护署正在合作进行一项为期四年的研究项目,以记录近30年来美国土地覆盖变化的类型、分布、比率、驱动因素和后果。你知道吗
7)该项目使用生态区域框架作为地理分层。你知道吗
使用
nltk
无疑是一种很好的方法。这些句子可以列举如下:这将显示以下输出:
相关问题 更多 >
编程相关推荐