Skip to content

Commit

Permalink
Missing head in answer json added!
Browse files Browse the repository at this point in the history
  • Loading branch information
BaiBlanc committed Jun 29, 2020
1 parent b321e0a commit eff2be1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gsoc/zheyuan/utility/benchmark/retrieve_answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def retrieve(query):
for td in rows.find_all("a"):
for a in td:
answer_dict = {
"results": {
"head" : {
"vars" : [ "uri" ]
},"results": {
"bindings": [{
"uri": {
"type": "uri",
Expand All @@ -45,8 +47,11 @@ def retrieve(query):
if len(pre) <= 50:
answer_dict = {
"results": {
"head": {
"vars": ["string"]
},
"bindings": [{
"uri": {
"string": {
"type": "literal",
"value": pre
}
Expand All @@ -70,7 +75,7 @@ def retrieve(query):
# query = args.query
answer_groups = []
i = 1
with open("../output_decoded.txt", 'r') as lines:
with open("./output_decoded.txt", 'r') as lines:
for line in lines:
i+=1
try:
Expand Down

0 comments on commit eff2be1

Please sign in to comment.