我有一些带有注释的文本,如下所示:
wewf.werwfwef. wewfwefwwew. wefewefwff
AnnotationA
asdfawece aefae eafewfaefa aefafe ceaewfae
adfcaecae acaeaet aegaegageg caeacdaefa
AnnotationB
sadaeceaee aef aewfaegg rresf ceeaefaeaeaf
adfcaecae acaeaet aegaegageg caeacdaefa
AnnotationA
adfcaecae acaeaet aegaegageg caeacdaefa
adfcaecae acaeaet aegaegageg caeacdaefa
AnnotationB
adfcaecae acaeaet aegaegageg caeacdaefa
adfcaecae acaeaet aegaegageg caeacdaefa
我想用 AnnotationA 及其最接近的 AnnotationB 作为特征创建一个注释。我应该如何用 Ruta 来表达这个?
我尝试了以下不正确的方法:
DECLARE Annotation TargetAnnotation (AnnotationA ana, AnnotationB anb);
Document {-> CREATE(TargetAnnotation, "ana" = AnnotationA, "anb" = AnnotationB)};
该规则涵盖整个文档。我只想要以 AnnotationA 及其最接近的 AnnotationB 作为特征的注释。非常感谢您的任何回答。