Skip to content

Instantly share code, notes, and snippets.

@eddotman
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eddotman/0dc3a3132630efab3b25 to your computer and use it in GitHub Desktop.
Save eddotman/0dc3a3132630efab3b25 to your computer and use it in GitHub Desktop.
#e.g. sentence = "To confirm recent reports [7, 8, 9] that human EB-1 is a plus-tip-tracking protein in vitro,
# we visualized EB1 interacting with microtubules [2, 35] polymerizing from stabilized seeds using 2-color TIRF microscopy."
def get_connotation(word):
# some black magic
return score #(1 = positive, -1 = negative, 0 = neutral)
def find_features(sentence):
trivial_feature = len(sentence.split(' ')) #approx. number of words
return [trivial_feature, ] #plus some non-trivial features...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment