Closed tedgoddard closed 4 years ago
Tests were not modified since I am not familiar with them. Instead, the following simple script was used:
from allennlp.data.tokenizers import SpacyTokenizer
from allennlp.predictors import Predictor
import allennlp_models.rc
from allennlp_semparse import predictors, models
from allennlp_semparse.dataset_readers import wikitables
archive_url = "https://storage.googleapis.com/allennlp-public-models/wikitables-model-2020.02.10.tar.gz"
wikitables = Predictor.from_path(archive_url, "wikitables-parser")
data = { "question": "who has three apples?", "table": "Name\tApples\tOranges\nBill\tTwo\tFour\nTed\tThree\tFive" }
print(wikitables.predict_json(data))
Thanks, this is super helpful! I'll take it from here, hopefully within the next day or two.
Thanks for getting this started @tedgoddard, it's now good to go.
This branch turned out to be the main functional changes from https://github.com/allenai/allennlp-semparse/pull/23
With these changes it is possible to run a wikitables prediction using AllenNLP 1.0.