Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Last active December 27, 2015 16:39
Show Gist options
  • Save language-engineering/7356872 to your computer and use it in GitHub Desktop.
Save language-engineering/7356872 to your computer and use it in GitHub Desktop.
Input:
query_token = The token we're interested in. It is part of a dependency tree of tokens.
Output:
opinions = An array of token forms (which constitute the extracted opinions related to the query token
opinions = []
for each dependent token of query_token, then
append dependent's form to opinions array if the dependency relation of the dependent is "det"
head = the head token of query_token
if the PoS of head starts with "VB", then
append head's form to opinions array
return opinions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment