2

For a project on NLP I need to extract verb phrases from a list of sentences. I have read some older posts from StackOverflow and watched this video. All was very helpful in understanding my problem and learning about possible patterns, but all code refers to a textacy module function:

textacy.extract.matches(txt, patterns=pattern)

I believe this code is not usable anymore, as I get the error that the module is not callable.

TypeError: 'module' object is not callable

I have looked at SpaCy's matcher to solve my problem but I am not sure if this can be used for verb phrase extraction as well. Does anyone have an updated way of extracting verb phrases?

Sam V
  • 479
  • 1
  • 4
  • 11
  • Can you give some examples of input and output? spaCy's matchers (maybe the DependencyMatcher in this case) should have no problem doing what you need. https://spacy.io/usage/rule-based-matching – polm23 Apr 28 '21 at 04:46

1 Answers1

3

Looks like current textacy docs change

textacy.extract.matches

to

textacy.extract.matches.token_matches

for your use-case.