gpt4 book ai didi

nlp - 在 GATE 中多行注释句子

转载 作者:行者123 更新时间:2023-12-02 09:24:31 26 4
gpt4 key购买 nike

我对 GATE 中的 Sentence Splitter 模块有疑问。我的文字是这样的:

Social history. He drank a lot in his young age. He did
not attend a school. He was depressed of his condition.

虽然我们确定句子应该像这样拆分

Sentence 1: Social history.
Sentence 2: He drank a lot in his young age.
Sentence 3: He did not attend a school.
Sentence 4: He was depressed of his condition.

ANNIE Sentence Splitter 认识到不同行中的文本应该分组在不同的句子中,因此结果如下:

Sentence 1: Social history.
Sentence 2: He drank a lot in his young age.
Sentence 3: He did
Sentence 4: not attend a school.
Sentence 5: He was depressed of his condition.

那是因为句子被分成了多行。有没有办法告诉分句器这个句子可能不止一行?或者是否有更好的方法来识别此类文本中的句子?

谢谢你:)

最佳答案

尝试使用 RegEx Sentence Splitter 而不是 Annie。

使用 ANNIE Sentence Splitter,您有参数 TransducerURL,它默认指向如下内容:

/PATH-TO-GATE/plugins/ANNIE/resources/sentenceSplitter/grammar/main-single-nl.jape

在此文件夹中还有一个 jape 文件,名为:

/PATH-TO-GATE/plugins/ANNIE/resources/sentenceSplitter/grammar/main.jape

如果您更改它,它应该可以工作。

关于nlp - 在 GATE 中多行注释句子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38892155/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com