简体   繁体   中英

How to extract verb phrases today?

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?

Looks like current textacy docs change

textacy.extract.matches

to

textacy.extract.matches.token_matches

for your use-case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM