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

Google Colab upgraded python version to 3.10

I am trying to use google colab to use allennlp library 0.9.0. Recently Google colab upgraded its python version to 3.10. Using the fallback command (Google colab's official way to use previous python version) downgrades the python version to 3.9…
0
votes
0 answers

Why the training time of CRF module from allennlp is higher?

I have build a custom Model in pytorch with a BERT + BiLSTM + CRF architecture. For the CRF layer I have used the allennlp's CRF module. Due to the CRF module the training and inference time increases highly. As far as I know the CRF layer should…
0
votes
0 answers

AllenNLP Coreference Resolution Memory Issue

Trying to run AllenNLP coreference resolution on 1000 small text files. Each file is about 1000 characters long. But my laptop is crashing every time. The code works for 20 texts but crashes when it closes to 120 files. Why is that happening? Laptop…
Naffi
  • 710
  • 1
  • 6
  • 13
0
votes
0 answers

AllenNLP v1.5.0 No module named 'allennlp.data.tokenizers.word_splitter'

I got an import error as : from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter ModuleNotFoundError: No module named'allennlp.data.tokenizers.word_splitter' Also allennlp.data.tokenizers.word_splitter no longer exists in the latest…
Jeff
  • 46
  • 5
0
votes
0 answers

How to use multiple GPUs for training?

I am simply trying to understand how to format a config file to allow multiple GPUs/distributed training to take place via the "train" command. The only clear tutorial out there is seemingly for much older versions of AllenNLP: Tutorial: How to…
0
votes
0 answers

How can I make the openIE input file format

I want to do OpenIE extraction and make the input file, but I cannot figure out the way to convert the raw sentence. My example is below: Example(input raw sentence): 32.7 % of all households were made up of individuals and 15.7 % had someone living…
Whitney
  • 1
  • 1
0
votes
1 answer

How to convert a list of words into multiple sentences in python

Eg: Input: Name: ['FirstName','LastName','FirstNameLastName'] Customer Account Number: ['Customer', 'Account', 'Number', 'Customer Account', 'Customer Number', 'Customer Account Number'] output: FirstNameLastName Customer Account Number
0
votes
0 answers

How to change the train set during training with AllenNLP

I'm new to AllenNLP. I was considering providing different training set at each epoch, but use the same model. If I use a configuration file such as jsonnet, the training set must not change during the entire training process. My current idea is to…
tzshyr
  • 3
  • 1
0
votes
0 answers

Training SRL using BERT on german language with AllenNLP

I am trying to train a SRL model for German text by translating Ontonotes dataset and propagating the labels from English sentences to German sentences. When i train the model with this dataset, as well a manually annotated dataset i seem to be…
steve simon
  • 51
  • 1
  • 6
0
votes
0 answers

Questions about start training from checkpoint using --recover in allennlp

For some reason, during training: I want to store the checkpoint after every epoch and start training the next epoch from the stored checkpoint. I want the training state to remain continued among epochs. For example, when training epoch 2 from…
0
votes
1 answer

Load custom package model to get model vocabulary in AllenNLP python interface

I'm trying to get the vocabulary from some publicly-available pre-trained models (that aren't mine) using the python interface of AllenNLP, using self.vocab. However, I'm running into problems trying to load in the model. I'm looking to get the…
SLotreck
  • 41
  • 5
0
votes
1 answer

Change tokenizer when loading Dependency Parsing model from AllenNLP

I am using a pretrained dependency parsing model from AllenNLP, namely this one. I have the sentence How do I find work-life balance?, and when extracting the dependency graph, the tokenizer used by the AllenNLP model splits the sentence as ['How',…
0
votes
1 answer

Equivalent of allennlp.commands.elmo in Allennlp v0.8.4 for version 2.10.0

I'm using a Python library as a dependency of my app, which imports Allennlp v0.8.4. The library uses ElmoEmbedder class for getting tokenised word embeddings with its batch_to_embeddings() function as follows: elmo = ElmoEmbedder(options, weight,…
ea03
  • 13
  • 3
0
votes
1 answer

Allennlp Does not generate model.tar.gz after training

I am training a coreference resolution model with Alennlp. However after I execute the command train_data_path= validation_data_path= test_data_path= dataset_reader= allennlp train -s…
Randy Chng
  • 103
  • 5
0
votes
0 answers

Semantic Role Labeling tag issue

I am trying to extract causal arguments at the sentence level. so far, my code works but somehow returns the wrong arguments. Such that: SRL demo for sentence 'Our results may be materially adversely affected by the outcomes of litigation, legal…
hilo
  • 116
  • 11