Created
September 4, 2015 15:41
-
-
Save ejmurray/c70b2da2d179a466f5c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
__author__ = 'Ernest' | |
from fuzzywuzzy import fuzz | |
from fuzzywuzzy import process | |
COMPOUND_LIST = "compounds.txt" | |
wordlist = open(COMPOUND_LIST).readlines() | |
# Get rid of newlines | |
wordlist = [word.lower().strip() for word in wordlist] | |
for word in wordlist: | |
print word | |
choices = ["YH3945", "Procarbazineide", "Procarbazine-N-oxide", "Dallas Cowboys"] | |
c = process.extract("Procarb", choices, limit=2) | |
print c | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment