Skip to content

Instantly share code, notes, and snippets.

@y-abe
Last active December 24, 2015 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-abe/1389e8a7ca221220a1a1 to your computer and use it in GitHub Desktop.
Save y-abe/1389e8a7ca221220a1a1 to your computer and use it in GitHub Desktop.
import nltk
from nltk.corpus import wordnet as wn
from nltk.stem.porter import PorterStemmer
from nltk.stem import WordNetLemmatizer
wordnet_lemmatizer = WordNetLemmatizer()
porter_stemmer = PorterStemmer()
print porter_stemmer.stem('presumably')
print wordnet_lemmatizer.lemmatize('studies')
print map( lambda x : x.lemma_names(), wn.synsets('nuclear') )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment