Skip to content

Commit

Permalink
Comparing meta articles + search results
Browse files Browse the repository at this point in the history
  • Loading branch information
Elaine Lin committed Nov 9, 2015
1 parent 7089a5b commit cb73002
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions search.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@ def getTitles(url):
return links

#test = 'Meta-Analysis of Soy Intake and Breast Cancer Risk.txt'
for fileName in os.listdir(os.getcwd()+"/meta"):
if ".txt" in fileName and len(fileName) > 8: #HACKY, FIX
query = findKeyWord(fileName)
url = generateURL(query)
print url
searchResults = getTitles(url)
metaReferences = parseReference.getMetaReferences(fileName)
for meta in metaReferences:
for result in searchResults:
if result in meta:
print result

#for fileName in os.listdir(os.getcwd()+"/meta"):
# if ".txt" in fileName and len(fileName) > 8: #HACKY, FIX

def compareMetaSearch(fileName):
query = findKeyWord(fileName)
url = generateURL(query)
print url
searchResults = getTitles(url)
metaReferences = parseReference.getMetaReferences(fileName)
for meta in metaReferences:
for result in searchResults:
if result in meta:
print result
#print getTitles(testURL)
test = 'Meta-analyses of Observational and Genetic Association Studies of Folate Intakes or Levels and Breast Cancer Risk.txt'
compareMetaSearch(test)

0 comments on commit cb73002

Please sign in to comment.