Skip to content
Discussion options

You must be logged in to vote

Hi @afi1289 ,

If you want the Matcher to immediately return the matches, you can replace that line with:

df_name['matches_tuples'] = df_name['Text_spacy'].apply(lambda x: [i.text for i in matcher(x, as_spans=True)])

You can check the spaCy Matcher documentation for more information. I can't help you with your other questions because it's mostly related to the pandas library than with spaCy. If you're worried about performance / efficiency, I highly recommend checking out their scaling user guide as a start.

Hope that helps!

Replies: 1 comment

Comment options

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