Skip to content

Instantly share code, notes, and snippets.

@mohdsanadzakirizvi
Created February 6, 2019 05:29
Show Gist options
  • Save mohdsanadzakirizvi/4cad767690af9e400017a1cd487e3dbc to your computer and use it in GitHub Desktop.
Save mohdsanadzakirizvi/4cad767690af9e400017a1cd487e3dbc to your computer and use it in GitHub Desktop.
#get the dependency parse of the first sentence
print('---')
print('dependency parse of first sentence')
dependency_parse = sentence.basicDependencies
print(dependency_parse)
# get the first token of the first sentence
print('---')
print('first token of first sentence')
token = sentence.token[0]
print(token)
# get the part-of-speech tag
print('---')
print('part of speech tag of token')
token.pos
print(token.pos)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment