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
0
votes
2 answers

Read JSON file correctly

I am trying to read a JSON file (BioRelEx dataset: https://github.com/YerevaNN/BioRelEx/releases/tag/1.0alpha7) in Python. The JSON file is a list of objects, one per sentence. This is how I try to do it: def _read(self, file_path): with…
0
votes
1 answer

Confidence score of answer extracted using ELMo BiDAF model and AllenNLP

I'm working on a Deep Learning project where I use a bidirectional attention flow model (allennlp pretrained model)to make a question answering system.It uses squad dataset.The bidaf model extracts the answer span from paragraph.Is there any way to…
Linu Bajy
  • 1
  • 1
0
votes
1 answer

Allennlp coref model latest version

I'm searching for the latest tar file of coref model of allennlp. where can i find it. Because in demo page of allennlp that output is different and when i tried using the example code the output is different. The version in the example was…
0
votes
0 answers

ValueError: ParentedTree.read(): expected 'end-of-string' but got '(:'

Here is a step-by-step code to debug the error I'm getting: from nltk.tree import ParentedTree teststr = 'a) Any service and handling fee imposed on customers by Used Motor Vehicle Dealers subject to these Rules: \r\n 1) shall be charged…
rohanp965
  • 1
  • 1
0
votes
0 answers

"No enough value to unpack" while loading the dataset- Allennlp _read

I am trying to use Allennlp library to perform NER. The library works perfectly fine with conll2003 and other databases which only have entities and tokens (I had to update _read function for the same). But the function returns "ValueError: not…
0
votes
1 answer

Replicating Semantic Analysis Model in Demo

Good day, I am a student that is interested in NLP. I have come across the demo on AllenNLP's homepage, which stated that: The model is a simple LSTM using GloVe embeddings that is trained on the binary classification setting of the Stanford…
Benji Tan
  • 635
  • 7
  • 22
0
votes
1 answer

How to write an @overrides allennlp predictor.load_line?

AllenNLP has a predictor function that takes in a JSON file then output a JSON file. From the documentation one can @overrides predictor.load_line and write in a function to take in, say, a text file. How would you write this function? And how to…
0
votes
1 answer

ModuleNotFoundError: No module named 'allennlp.common'

I am getting this error while importing allennlp, from allennlp.common.util import sanitize ModuleNotFoundError: No module named 'allennlp.common' (venv-kbs) administrator@NLR:~/aman/Project$ python Python 3.6.3 (default, Oct 6 2017, 00:00:00) [GCC…
Aman Dalmia
  • 83
  • 2
  • 9
-1
votes
1 answer

AllenNLP - Support for different languages

Is there any current support for other languages? For example, Spanish. If not, is it planned? Or else, what would be the way to add it?
Ric
  • 65
  • 9
-1
votes
1 answer

How to use a pre-trained language model correctly?

I'm trying to use a Huggingface pretrained model "GPT2dialog" as a encoder for sentences,But the textindexer confused me. In detail ,I can run a unittest for dataset_reader with a pretrained indexer normally,when use the train command to train the…
-1
votes
1 answer

ImportError: cannot import name 'SnliReader' from 'allennlp.data.dataset_readers'

I am beginner in understanding Allennlp framework. I tried the code given in medium post https://medium.com/analytics-vidhya/fine-tuning-bert-with-allennlp-7459119b736c. But, got an ImportError: cannot import name 'SnliReader' from…
-1
votes
1 answer

How to run django app in allen NLP environment?

I have created an API in Django. It is supposed to take a request and pass the argument to allenNLP files to gather a computed response. I want to know how to run my django app in allenNLP environment and I want all the source code of allenNLP to be…
Tahseen Rahman
  • 97
  • 3
  • 13
-2
votes
1 answer

CUDA memory issue with allennlp coreference resolution API

Hi I have some CUDA memory issue even though I am using multiple GPUs. I am calling coreference resolution API on long document (aorund 2000words). It seems that the memory is not paralleled. How can I solve this issue? (I am currently using the API…
-3
votes
2 answers

TypeError: 'NLP' object is not callable

Here's the Site From here i just try to ran the sample code provided on site, but am getting this error TypeError Traceback (most recent call last) in ----> 1 text = nlp("The virginica species has the least…
Thirumalai vasan
  • 655
  • 2
  • 6
  • 19
1 2 3
13
14