Skip to content

getting all parts of speech #34

@jtoy

Description

@jtoy

in nltk you can do this to get all verbs, nouns, or adjectives, would be great if we could do this as well here:

import nltk
from nltk.corpus import wordnet

list = []
# use 'a' for adjective
pos = 'v'
for synset in wordnet.all_synsets(pos):
    list.append(synset.lemmas()[0].name())
print(list)
print(len(list))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions