Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Fixing the table format for the WikiTables executor (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-gardner committed Sep 18, 2018
1 parent 6039ac0 commit 7647de8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -267,7 +267,7 @@ def text_to_instance(self, # type: ignore
tokenized_question = tokenized_question or self._tokenizer.tokenize(question.lower())
question_field = TextField(tokenized_question, self._question_token_indexers)
metadata: Dict[str, Any] = {"question_tokens": [x.text for x in tokenized_question]}
metadata["original_table"] = "".join(table_lines)
metadata["original_table"] = "\n".join(table_lines)
table_knowledge_graph = TableQuestionKnowledgeGraph.read_from_lines(table_lines, tokenized_question)
table_metadata = MetadataField(table_lines)
table_field = KnowledgeGraphField(table_knowledge_graph,
Expand Down
1 change: 0 additions & 1 deletion allennlp/predictors/wikitables_parser.py
Expand Up @@ -69,7 +69,6 @@ def predict_instance(self, instance: Instance) -> JsonDict:
outputs['original_table'])
return sanitize(outputs)


def predict_batch_instance(self, instances: List[Instance]) -> List[JsonDict]:
outputs = self._model.forward_on_instances(instances)
for output in outputs:
Expand Down

0 comments on commit 7647de8

Please sign in to comment.