Issue in creating Semgrex patterns with relation names containing ":" colon

132 views Asked by At

I am trying to perform Semgrex in https://corenlp.run/ on the below sentence to extract the transition event. Since the dependency relation "obl:from" has a colon in it, I get an error. But instead, if I used nsubj, I get the desired result. Can someone tell me how to work around this?

My text: The automobile shall change states from OFF to ON when the driver is in control.

{} <<nsubj {}
{} <<obl:from  {}    

working scenario screenshot Issue scenario screenshot

1

There are 1 answers

0
Hariprasad Ramakrishnan On BEST ANSWER

Found the answer! Just wrap the expression within / / and it works! For eg.

{} <<  /obl:from/  {}