Category "nlp"

It looks like the config file at 'bert-base-uncased' is not a valid JSON file?

Working fine for months, then I interrupted a "bert-large-cased" download and the following code returns the error in the title: from transformers import BertMo

Value error trying to fit a logistic regression with SentenceTransformer output (embeddig)

My code: model = SentenceTransformer('hiiamsid/sentence_similarity_spanish_es') I apply the model to the text column of the data frame prueba['encoder'] = prueb

Is there any way to put timer/end the serving of infographics automatically in dispacy?

While running the code with displacy, I see the images being created perfectly as expected. They are also projected to a server, the address of which is mention

Extract multiple start date and end date from a string in python?

I am making a resume parser but I want to know the years of experience of the person from the experience section and want results like if there are 3 years of e

How to fix Spacy Transformers for Spacy version 3.1

I'm having the following problem. I've been trying to replicate example code from this source: Github I'm using Jupyter Lab environment on Linux and Spacy 3.1 #

Calculate and return the average of positive, negative, and neutral

I have the following dataframe: enter image description here I am trying to have three additional columns in which they return sum of instances of 0, 1-, and 1

How to replace [UNK] tokens with original tokens in BERT nlpaug

I am trying to use nlpaug to swap some words out but am having issue with it replacing tokens permanently with the [UNK] token. I am using the docs here: https:

spaCy: Which component of the pre-trained en_core_web_md pipeline contains the morphologizer/morphological analysis?

I need the mentioned pre-trained pipeline to analyze the morphological features of my text. To disable the rest of the modules I don't need in my pipeline to ma

nlpaug wordembeddings model not working PermissionError: [Errno 13] Permission denied: '.'

I am following these docs to try and do random word insertion: https://nlpaug.readthedocs.io/en/latest/augmenter/word/word_embs.html However when simply trying

Why FLAIR does't recognize the entire location name of simple sentence?

I'm tying to to detect simple location with NER algorithm, and I'm getting semi-correct results: from flair.data import Sentence from flair.models import Sequ

For integer/dates values annotated using Prodigy, does the spaCy model learn the range of values as well?

I have a prodigy session set up to annotate certain numeric values in a document for age (ranges from 0 to 100). I am only annotating the number. My question is

After executing the last line i get following error: ValueError: y should be a 1d array, got an array of shape (4457, 2) instead

y = pd.get_dummies(messages['label']) y = y.iloc[:,1].values from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_tes

Type of adapters for machine translation (AdapterHub tutorial)

I'm following this guide which explains how to apply adapters to a model for a binary classification task, and I want to adapt it to a machine translation task.

Transformers model from Hugging-Face throws error that specific classes couldn t be loaded

Hi after running this code below, I get the following error. ValueError: Could not load model facebook/bart-large-mnli with any of the following classes: (<c

Solving "CUDA out of memory" when fine-tuning GPT-2 (HuggingFace)

I get the reoccuring CUDA out of memory error when using the HuggingFace Transformers library to fine-tune a GPT-2 model and can't seem to solve it, despite my

German keyword search - look for every possible combination

I'm working on a project where I define some nouns like Haus, Boot, Kampf, ... and what to detect every version (singular/plurar) and every combination of these

Extract specific DATE entity from an sentence by the use of spaCy, and calculate the relative time

import spacy import en_core_web_sm nlp = en_core_web_sm.load() doc = nlp('I get cough yesterday, and tomorrow I will go to hostipital') for t in doc.ents: i

How to integrate Amazon lex with MS Bot framework?

I would like to integrate Amazon Lex with the Microsoft Bot Framework. There is a default integration between Microsoft LUIS NLP and the Microsoft Bot Framework

Reproducibility issue with PyTorch

I'm running a script with the same seed and I see results are reproduced on consecutive runs but somehow running the same script with the same seed changes the

How to setup LSTM to use n-grams instead of sequence length?

I currently have an LSTM which uses sequence length as input, but this only allows the LSTM to predict when the input length is equal to the used sequence lengt