设置功能-Uima Ruta
Setting Features-Uima Ruta
我正在尝试 "learning by example" uima ruta documentation.I 已经尝试过如何通过将给定的注释存储为特征来定义和分配雇佣关系 values.But 我遇到错误messages.I概念不清楚可以详细解释一下。
DECLARE Annotation EmplRelation
(Employee employeeRef, Employer employerRef);
Sentence{CONTAINS(EmploymentIndicator) -> CREATE(EmplRelation,"employeeRef" = Employee, "employerRef" = Employer)};
e1:Employer # EmploymentIndicator # e2:Employee) {-> EmplRelation, EmplRelation.employeeRef=e2, EmplRelation.employerRef=e1};
假设上述错误信息可能是:问题中的脚本不完整。 "learning by example" 部分并不总是包含完整的脚本,而是建立在前面的示例之上。此示例的完整 运行 脚本可能如下所示(对于 "Peter works for Frank." 这样的输入文本):
DECLARE Employee, Employer, EmploymentIndicator, Sentence;
DECLARE EmplRelation (Employee employeeRef, Employer employerRef);
// create some dummy annotations to work on
"Peter" -> Employee;
"Frank" -> Employer;
"works for" -> EmploymentIndicator;
(# PERIOD){-> Sentence};
// the actual rules
Sentence{CONTAINS(EmploymentIndicator) -> CREATE(EmplRelation,"employeeRef" = Employee, "employerRef" = Employer)};
(e1:Employee # EmploymentIndicator # e2:Employer) {-> EmplRelation, EmplRelation.employeeRef=e1, EmplRelation.employerRef=e2};
请注意,我修改了最后一条规则,使其适用于最小示例。
免责声明:我是 UIMA Ruta 的开发者
我正在尝试 "learning by example" uima ruta documentation.I 已经尝试过如何通过将给定的注释存储为特征来定义和分配雇佣关系 values.But 我遇到错误messages.I概念不清楚可以详细解释一下。
DECLARE Annotation EmplRelation
(Employee employeeRef, Employer employerRef);
Sentence{CONTAINS(EmploymentIndicator) -> CREATE(EmplRelation,"employeeRef" = Employee, "employerRef" = Employer)};
e1:Employer # EmploymentIndicator # e2:Employee) {-> EmplRelation, EmplRelation.employeeRef=e2, EmplRelation.employerRef=e1};
假设上述错误信息可能是:问题中的脚本不完整。 "learning by example" 部分并不总是包含完整的脚本,而是建立在前面的示例之上。此示例的完整 运行 脚本可能如下所示(对于 "Peter works for Frank." 这样的输入文本):
DECLARE Employee, Employer, EmploymentIndicator, Sentence;
DECLARE EmplRelation (Employee employeeRef, Employer employerRef);
// create some dummy annotations to work on
"Peter" -> Employee;
"Frank" -> Employer;
"works for" -> EmploymentIndicator;
(# PERIOD){-> Sentence};
// the actual rules
Sentence{CONTAINS(EmploymentIndicator) -> CREATE(EmplRelation,"employeeRef" = Employee, "employerRef" = Employer)};
(e1:Employee # EmploymentIndicator # e2:Employer) {-> EmplRelation, EmplRelation.employeeRef=e1, EmplRelation.employerRef=e2};
请注意,我修改了最后一条规则,使其适用于最小示例。
免责声明:我是 UIMA Ruta 的开发者