1

I am getting errors when I try to create ‘Sentence contains’ jape rules with OR operators, i.e when a Sentence contains 1 OR 2 AND 3 OR 4:

(
   { 
      Sentence contains { Annotation1 | Annotation2 },  
      Sentence contains { Annotation3 | Annotation4 }
   }
)  
:temp  
--> 

Can someone please advise on the correct syntax?

Innat
  • 16,113
  • 6
  • 53
  • 101
FJ1993
  • 115
  • 1
  • 8

1 Answers1

3

There is no such thing like AND operator in LSH jape grammar and we cannot use OR operator inside contextual operators ie; contains and within. Instead you can code like this.

(
    ({Sentence contains {Annotation1}} | {Sentence contains {Annotation2}})
    ({Sentence contains {Annotation3}} | {Sentence contains {Annotation4}})
)
:temp
-->
Aniz
  • 131
  • 5