Harium / suneidesis

A project to represent knowledge
MIT License
2 stars 1 forks source link

[Linguistics] Add query matchers #51

Closed yuripourre closed 3 years ago

yuripourre commented 5 years ago

Turn existing matchers into query matchers

sequence(eq("quanto"),or(eq("é"),eq("custa")), optional ("isso"))

The next matcher is only evaluated when the first is satisfied.

Ideally they could be translated to a standard regex pattern.

They would be super useful if work with a list of tokens (Tokenizer).

yuripourre commented 3 years ago

Candidates: https://github.com/VerbalExpressions/JavaVerbalExpressions

Or more heavyweight: https://github.com/sgreben/regex-builder

yuripourre commented 3 years ago

It was done when the persistent database was included: https://www.javadoc.io/doc/org.dizitart/nitrite/3.0.0/org/dizitart/no2/Filter.html