I am trying to use allennlp predictor for biaffine parser. Here is the code:-
from allennlp.predictors.predictor import Predictor
predictor = Predictor.from_path("https://s3-us-west-2.amazonaws.com/allennlp/models/biaffine-dependency-parser-ptb-2018.08.23.tar.gz")
However, I get this error:-
ConfigurationError Traceback (most recent call last)
<ipython-input-3-74e2bcfcbf43> in <module>()
1 from allennlp.predictors.predictor import Predictor
----> 2 predictor = Predictor.from_path("https://s3-us-west-2.amazonaws.com/allennlp/models/biaffine-dependency-parser-ptb-2018.08.23.tar.gz")
4 frames
/usr/local/lib/python3.6/dist-packages/allennlp/common/params.py in pop_choice(self, key, choices, default_to_first_choice, allow_class_names)
350 """{"model": "my_module.models.MyModel"} to have it imported automatically."""
351 )
--> 352 raise ConfigurationError(message)
353 return value
354
ConfigurationError: universal_dependencies not in acceptable choices for dataset_reader.type: ['conll2003', 'interleaving', 'sequence_tagging', 'sharded', 'babi', 'text_classification_json']. 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.
That's a very old model, the newer version should work fine: https://storage.googleapis.com/allennlp-public-models/biaffine-dependency-parser-ptb-2020.04.06.tar.gz