archive = load_archive(
"elmo-constituency-parser-2018.03.14.tar.gz"
)
predictor = Predictor.from_archive(archive, 'constituency-parser')
predictor.predict_json({"sentence": "This is a sentence to be predicted!"})
Loading the elmo-constituency-parser is thorwing this error: allennlp.common.checks.ConfigurationError: ptb_trees not in acceptable choices for
dataset_reader.type: ['babi', 'conll2003', 'interleaving', 'multitask', 'sequence_tagging', 'sharded', 'text_classification_json', 'multitask_shim']. You should either use the --include-package flag to make sure the correct module is loaded, or use a fully qualified class name in your config file like {"model": "my_module.models.MyModel"} to have it imported automatically.
Seems the load_archive func returnd a model name "ptb_trees" and a name containd "." was required, such as {"model": "my_module.models.MyModel"}
Any suggestion? Thanks!