primeqa.tableqa.postprocessor.wikisql.WikiSQLPostprocessor#

class primeqa.tableqa.postprocessor.wikisql.WikiSQLPostprocessor(tokenizer, args)#

Bases: object

Methods

get_predicted_answer_text

The functions takes answer coordinates as input and predicts the answer texts

postprocess_prediction

Post process wikisql prediction using dev dataset and predictions

get_predicted_answer_text(table_file, answer_coordinates)#

The functions takes answer coordinates as input and predicts the answer texts

Parameters
  • table_file (String) – Name of the table file

  • answer_coordinates (int,int) – Row column index

Returns

_description_

Return type

_type_

postprocess_prediction(eval_examples, eval_dataset, predictions)#

Post process wikisql prediction using dev dataset and predictions

Parameters
  • eval_examples (Examples) – examples

  • eval_dataset (Dataset) – Development dataset object

  • predictions (Tensor) – prediction for each instance

Returns

_description_

Return type

_type_