Questions tagged [allennlp]

An open-source NLP research library, built on PyTorch

An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art deep learning models on a wide variety of linguistic tasks.

Quick Links

210 questions
3
votes
1 answer

KeyError: 'predictions' When use SimpleSeq2SeqPredictor to predict string

Please first search our GitHub repository for similar questions. If you don't find a similar example you can use the following template: System (please complete the following information): - OS: Ubunti 18.04 - Python version: 3.6.7 - AllenNLP…
sappy
  • 770
  • 2
  • 6
  • 16
3
votes
1 answer

Understanding ELMo's number of presentations

I am trying my hand at ELMo by simply using it as part of a larger PyTorch model. A basic example is given here. This is a torch.nn.Module subclass that computes any number of ELMo representations and introduces trainable scalar weights for each.…
Bram Vanroy
  • 27,032
  • 24
  • 137
  • 239
2
votes
0 answers

InvalidVersion: Invalid version: '0.10.1,<0.11' in Colab when trying to "from allennlp.nn.util import sort_batch_by_length, masked_softmax"

I was using this for a couple of months just fine in Colab. But when I tired to work with it today I saw this error InvalidVersion: Invalid version: '0.10.1,<0.11' the error appears when I try to import form allennlp.nn.util in here: from…
Gigigi
  • 21
  • 2
2
votes
1 answer

How to install jsonnet on conda

I am installing allennlp and it has quite a lot of dependencies. Everything is installing fine but the installalation of Jsonnet is failing. I tried installing jsonnet using pip install jsonnet manually but that isn't working either.
Arion Love
  • 23
  • 4
2
votes
1 answer

How to change AllenNLP BERT based Semantic Role Labeling to RoBERTa in AllenNLP

Currently i'm able to train a Semantic Role Labeling model using the config file below. This config file is based on the one provided by AllenNLP and works for the default bert-base-uncased model and also GroNLP/bert-base-dutch-cased. { …
2
votes
1 answer

Location of downloaded model when using Predictor.from_path in AllenNLP?

I'm following AllenNLP's example code for correference resolution, which has a method Predictor.from_path: from allennlp.predictors.predictor import Predictor import allennlp_models.tagging predictor =…
2
votes
0 answers

Can I train an ELMo model from scratch using allennlp.modules.elmo.Elmo?

I've been looking to train my own ELMo model for the past week and came across these two implementations allenai/bilm-tf & allenai/allennlp. I've been facing a few roadblocks for a few techniques I've tried and would like to clarify my findings, so…
Goh Jia Yi
  • 329
  • 3
  • 16
2
votes
2 answers

How to resolve coreferences without Internet using AllenNLP and coref-spanbert-large?

A want to resolve coreferences without Internet using AllenNLP and coref-spanbert-large model. I try to do it in the way that is describing here https://demo.allennlp.org/coreference-resolution My code: from allennlp.predictors.predictor import…
Daisy
  • 21
  • 1
2
votes
1 answer

Trouble Finetuning Decomposable Attention Model in AllenNLP

I'm having trouble fine-tuning the decomposable-attention-elmo model. I have been able to download the model: wget https://s3-us-west-2.amazonaws.com/allennlp/models/decomposable-attention-elmo-2018.02.19.tar.gz. I'm trying to load the model and…
hockeybro
  • 981
  • 1
  • 13
  • 41
2
votes
1 answer

what controls the order of UMLS linked entities from scispacy if the scores are all 1

i'm using Scispacy (which is awesome!) but when I type 'tau' into the app found here https://scispacy.apps.allenai.org/ the UMLS entity gives me the canonical name of 'MAPT gene' which is what I want. But when I do the exact same thing in my python…
2
votes
1 answer

Extracting Postprocessed Triples from AllenNLP Open IE model

I would like to extract clean triples in tuple form of (subject,relation,object) from the Allen NLP Open IE predictor model. Currently, I see that the steps are as follows OIE_output = predictor_OIE.predict(sentence=sent) for verb in…
2
votes
1 answer

Passage Length Limit for AllenNLP Question Answering

I'm pretty new to AllenNLP and I'm currently using its pre-trained question answering model. I wonder if it has a passage length limit to ensure its performance? I know BERT will have a maximum length of 512 and will truncate longer passages. I have…
mattstack
  • 21
  • 3
2
votes
1 answer

AllenNLP Reading Comprehension results are different in UI Demo and Python Library

I am trying AllenNLP reading comprehension with the Transformer QA Model to get the answer to question "Who is CEO of ABB?" from the passage "ABB opened its first dedicated global healthcare research center for robotics in October 2019.". As…
sujoysett
  • 21
  • 1
2
votes
1 answer

Is allennlp.service being deprecated?

I noticed that after I pulled version 1.0.0, I was no longer able to import allennlp.service. I see the docs are still updated only as far as 0.9.0 as well so I'm not sure what the status of the service module is.
jamie
  • 41
  • 2
2
votes
0 answers

How to save a spacy model with UMLSEntityLinker on disk and load that as well?

I have below code and I want to save this exact model on the disk and load that in the code. So that I can prevent resource exhaustion. import scispacy import spacy from spacy import displacy from scispacy.abbreviation import…
1
2
3
13 14