Created
March 4, 2020 07:10
-
-
Save prateekjoshi565/4963f9989c74bc9c4d495c675d7a8f05 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 spacy | |
nlp = spacy.load('en_core_web_sm') | |
# Create an nlp object | |
doc = nlp("He went to play basketball") | |
# Iterate over the tokens | |
for token in doc: | |
# Print the token and its part-of-speech tag | |
print(token.text, "-->", token.pos_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment