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
1
vote
1 answer

how to convert outlogits to tokens?

i have a forward function in allenNlp given by : def forward(self, input_tokens, output_tokens): ''' This is the main process of the Model where the actual computation happens. Each Instance is fed to the forward method. It takes…
zizou123
  • 23
  • 4
1
vote
0 answers

Jupyter Notebook kernel dies when it tries to invoke elasticsearch

I'm getting a recurrent problem on my Jupyter Notebook. It runs a NLP model training with no issues, but after invoking elasticsearch to visualize some data on a dedicated UI, with these command pl_trained.explore(valid_ds, explain=True) andthese…
ignacioct
  • 325
  • 1
  • 12
1
vote
2 answers

flair import failing on mac ubuntu and google colab

i am trying to use flair nlp framework , https://github.com/flairNLP/flair but getting error # load the NER tagger tagger = SequenceTagger.load('ner') tried on local , remote and other machine . all failing as its not able to download a model from…
ajaypr55
  • 141
  • 2
  • 11
1
vote
0 answers

RuntimeError: expected device cpu and dtype Float but got device cpu and dtype Bool

I use this python script from AllenAI to integrate CRF module (Conditional random fields) layer in my ML-system ... and execute the following example to test the CRF module. import torch from allennlp.modules import ConditionalRandomField num_tags…
PinkBanter
  • 1,686
  • 5
  • 17
  • 38
1
vote
1 answer

Allennlp german elmo model

I want to build a Q&A bot with allennlp. I already found the code for it and an English model - I want to use the bot with german. I already searched for it, but I only found this model which is unfortunately not compatible with allennlp. Do you…
Unterbelichtet
  • 628
  • 2
  • 7
  • 18
1
vote
1 answer

How do you get a response from a Flask app with curl?

I'm building a Flask test predictor using AllenNLP. I'm passing 'passage' and 'question' from a .json file to the predictor. However, when I pass the json file using curl, it doesn't return a response. Is there a special return in Flask to get…
Doug
  • 169
  • 1
  • 2
  • 12
1
vote
1 answer

Unigram tagging in NLTK

Using NLTK Unigram Tagger, I am training sentences in Brown Corpus I try different categories and I get about the same value. The value is around 0.9328... for each categories such as fiction, romance or humor from nltk.corpus import brown #…
floss
  • 2,603
  • 2
  • 20
  • 37
1
vote
1 answer

How to circumvent AWS package and ephemeral limits for large packages + large models

We have a production scenario with users invoking expensive NLP functions running for short periods of time (say 30s). Because of the high load and intermittent usage, we're looking into Lambda function deployment. However - our packages are big.…
T. Altena
  • 752
  • 4
  • 15
1
vote
0 answers

How to fix 'allennlp.common.checks.ConfigurationError' in running scibert projec?

File"/home/yangzhiwei/workshop/scibert/scibert/models/bert_text_classifier.py", line 15, in from text_classifier import TextClassifier File "/home/yangzhiwei/workshop/scibert/scibert/models/text_classifier.py", line 15, in class…
Nico
  • 11
  • 3
1
vote
1 answer

Which versions of sanic-cors, sanic, and sanic-plugins-framework should I use when installing allennlp==0.3.0?

Which versions of the python packages sanic-cors, sanic, and sanic-plugins-framework should I use when installing allennlp==0.3.0 with Python 3.6 or 3.7? When I run: conda create --name selector-py36 python=3.6 source activate selector-py36 pip…
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
1
vote
0 answers

Where to add SentencePiece tokenization in AllenNlp pipeline?

I am new to allennlp, I use sentencepiece for subword tokenization in my pipeline. SentencePiece needs a training step to generate a subword model, which can then be used for tokenization. Is an implementation of Vocabulary class the right way to…
Sai Prasanna
  • 684
  • 1
  • 10
  • 25
1
vote
0 answers

How to use the correct version of python (OSX)?

I have the following version of python installed. $ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python $ which python3 /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 $ which…
user1424739
  • 11,937
  • 17
  • 63
  • 152
0
votes
0 answers

AttributeError by Allen NLP with pre trained Hugging face model

I am using Allen NLP with the config file. I am trying to fine tune the model MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 from Hugging Face. Unfortunately, I am getting the Error: AttributeError: 'DebertaV2Model' object has no…
0
votes
1 answer

Allennlp 2.10.1 Predictor throws "Not implemented" and "KeyError" Errors

I'm trying to use Allennlp's Predictor for Correference Resolution. It works fine in Google Colab, but altough the dependencies are identical it throws an error when I tried the same code in my local. Here is the full error log and my code: from…
ByUnal
  • 90
  • 1
  • 8
0
votes
0 answers

Unable to install spacy 2.1.9 on google colab with python 3.10

Recently I was using google colab when it ws on python 3.9. I need to work on spacy version 2.1.9 which has become incompatible with new version. Using fallback runtime also giving me the same installation issue. ERROR: Could not find a version that…