Last active
December 27, 2015 11:39
-
-
Save language-engineering/7320665 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
aspect = "dialogue" | |
# If you have a ParsedSentence object, you can get all the tokens whose form matches the aspect as shown below. | |
# So instead of just printing the parsed_sentence as in the previous section, get its aspect tokens and print them. | |
aspect_tokens = parsed_sentence.get_query_tokens(aspect) | |
# You could iterate over them and print them for inspection | |
for aspect_token in aspect_tokens: | |
print aspect_token | |
# Remember that each token in a ParsedSentence object is BasicToken object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment