clu-ling / logx-reader

https://clu-ling.github.io/logx-reader
0 stars 0 forks source link

Odin quantifier parsing #13

Open Daithi-stack opened 3 years ago

Daithi-stack commented 3 years ago

Quantifier in This rule:

- name: "what-query-1"
  label: WhatQuery
  priority: 2+
  example: "Find ports near Hamburg with enough excess cargo capacity to handle shipments redirected from Hamburg."
  pattern: |
    trigger = [lemma=/^(find)$/]
    topic:Entity? = (<<|>>)+ [incoming=nsubj]
    need:Entity? = (<<|>>)*? [incoming=dobj]
    #predicate:Verb? = (<<|>>)+ [outgoing=nsubj]
    constraints:Constraint* = (<<|>>)+

causes this Error:

Caused by: org.clulab.odin.impl.OdinNamedCompileException: Error parsing rule 'what-query-1': string matching regex `\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*' expected but `?' found
myedibleenso commented 3 years ago

NOTE: Odin currently doesn't support greedy or lazy quantifiers for dependency patterns.