Skip to content

Instantly share code, notes, and snippets.

@brendano
Last active December 22, 2015 18:59
Show Gist options
  • Save brendano/6516637 to your computer and use it in GitHub Desktop.
Save brendano/6516637 to your computer and use it in GitHub Desktop.
This is a edu.stanford.nlp.trees.Tree
tree.setSpans(); // these are 0-indexed, inclusive-inclusive
tree.indexSpans(); // yup, this saves stuff to a different place. apparently 0-indexed inclusive-exclusive
tree.indexLeaves(); // these are 1-indexed (!!) stanfordnlp coref code heavily uses them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment