Skip to content
Discussion options

You must be logged in to vote

I think you just need to use the with_alignments feature, which will give you a list that tells you which rule in the input pattern matches each token in the match. It's a relatively new feature but will let you map your matched tokens back to where in the rule they match, so you can make the non-required parts optional.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / matcher Feature: Token, phrase and dependency matcher
2 participants