Bucketing Verbs into categories- Is there an alternative to NLTK's Verbnet?

Viewed 25

I want to identify verbs which help in specifying the usage of an application.

Examples of such verbs: Update , Process , integrate , forecast.

I want to check the presence of such verbs in descriptions of Applications like:

  • MS Excel is used to prepare tables and forecast profits VS
  • Code is used to write python

Had initially planned to use NLTK Verbnet to categorize verbs by using verbnet.classids(verb), but have realized that it does not have verbs like download, update , process etc. Hence I am asking for recommendations of alternatives to verbnet that has a larger corpus of verbs and can categorize them.

Please let me know if I should post this question to another forum. Have posted it here because I want this to be a solution in python and am currently using a Python library - NLTK

Adding few examples of how Verbnet helps to classify verbs into categories:

#import
from nltk.corpus import verbnet

#use verbnet to list categories of verbs
print("categories for 'write'","-->",verbnet.classids("write"))
print()
print("categories for 'bake'","-->",verbnet.classids("bake"))

Results:

categories for 'write' --> ['lecture-37.11-1', 'performance-26.7-2-1', 'scribble-25.2', 'transfer_mesg-37.1.1-1-1']

categories for 'bake' --> ['build-26.1', 'cooking-45.3', 'preparing-26.3-1']
1 Answers

you can spacy language model,

 import spacy
 nlp = spacy.load("en_core_web_sm")

 data = ['I am to update my resume', 'I want to process huge dataset in python',
   'I want integrate my development code to my production code',
   'The company is forecasting reduced profits']

for text in data:
    doc = nlp(text)
    print("<-----Text------->")
    for token in doc:
        print(token,"-->", token.pos_)

#op
<-----Text------->
I --> PRON
am --> AUX
to --> PART
update --> VERB
my --> PRON
resume --> NOUN
<-----Text------->
I --> PRON
want --> VERB
to --> PART
process --> VERB
huge --> ADJ
dataset --> NOUN
in --> ADP
python --> PROPN
<-----Text------->
I --> PRON
want --> VERB
integrate --> VERB
my --> PRON
development --> NOUN
code --> NOUN
to --> ADP
my --> PRON
production --> NOUN
code --> NOUN
<-----Text------->
The --> DET
company --> NOUN
is --> AUX
forecasting --> VERB
reduced --> VERB
profits --> NOUN

But again , this is language model you need to check which one is working fine for your dataset. To achieve 100 % accuracy for your problem statement will be difficult

Related