Skip to content
Discussion options

You must be logged in to vote

Hi @e-e, you can apply a matcher that works with one-token-patterns, and iterate over the results.

# second_matcher only has one-token-patterns
for _, i, _ in second_matcher(doc[end:]):
    token = doc[i]
    # do something

Be careful though, the callback is applied every time so using the same matcher is probably not what you want.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@e-e
Comment options

@bdura
Comment options

@e-e
Comment options

@bdura
Comment options

Answer selected by e-e
@bdura
Comment options

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