-
-
Save amankharwal/ae6b4e6e1e52c2a666c7d3f739f49905 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
from nltk.stem.porter import PorterStemmer | |
porter=PorterStemmer() | |
def tokenizer(text): | |
return text.split() | |
def tokenizer_porter(text): | |
return [porter.stem(word) for word in text.split()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment