Last active
December 24, 2015 06:58
-
-
Save y-abe/1389e8a7ca221220a1a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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