Skip to content
Permalink
Browse files

Added NAQANet to pretrained.py and DEFAULT_PREDICTORS (#2731)

* Added NAQANet to pretrained.py and DEFAULT_PREDICTORS

* Trivial change to trigger CI
  • Loading branch information
matt-gardner committed Apr 23, 2019
1 parent 9dec020 commit 00e95b8b00b3edcb3df6f8338dd4440f3c39c698
Showing with 8 additions and 0 deletions.
  1. +1 −0 allennlp/predictors/predictor.py
  2. +7 −0 allennlp/pretrained.py
@@ -22,6 +22,7 @@
'decomposable_attention': 'textual-entailment',
'dialog_qa': 'dialog_qa',
'event2mind': 'event2mind',
'naqanet': 'machine-comprehension',
'simple_tagger': 'sentence-tagger',
'srl': 'semantic-role-labeling',
'quarel_parser': 'quarel-parser',
@@ -37,6 +37,13 @@ def bidirectional_attention_flow_seo_2017() -> predictors.BidafPredictor:
'machine-comprehension')
return model.predictor() # type: ignore

def naqanet_dua_2019() -> predictors.BidafPredictor:
with warnings.catch_warnings():
warnings.simplefilter(action="ignore", category=DeprecationWarning)
model = PretrainedModel('https://s3-us-west-2.amazonaws.com/allennlp/models/naqanet-2019.03.01.tar.gz',
'machine-comprehension')
return model.predictor() # type: ignore

def open_information_extraction_stanovsky_2018() -> predictors.OpenIePredictor:
model = PretrainedModel('https://s3-us-west-2.amazonaws.com/allennlp/models/openie-model.2018-08-20.tar.gz',
'open-information-extraction')

0 comments on commit 00e95b8

Please sign in to comment.
You can’t perform that action at this time.