Skip to content

Commit

Permalink
Removed type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-risch committed Apr 8, 2021
1 parent abd866c commit f3e2490
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions haystack/graph_retriever/text_to_sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ def retrieve(self, query: str, top_k: Optional[int] = None):

# if there are no answers we still want to return something
if len(answers) == 0:
answers.append(("", query))
answers.append(("", ""))
results = answers[:self.top_k]
results = [self.format_result(result) for result in results]
return results

def _query_kg(self, sparql_query: str):
# query KG
def _query_kg(self, sparql_query):
try:
response = self.knowledge_graph.query(sparql_query=sparql_query)

Expand Down

0 comments on commit f3e2490

Please sign in to comment.