Category : nlp

I need to get a confidence score for the tags predicted by NER ‘de_core_news_lg’ model. There was a well known solution to the problem in the Spacy 2: nlp = spacy.load(‘de_core_news_lg’) doc = nlp(‘ich möchte mit frau Mustermann in der Musterbank sprechen’) text = content doc = nlp.make_doc(text) beams = nlp.entity.beam_parse([doc], beam_width=16, beam_density=0.0001) for score, ..

Read more

I am trying to run a supervised model on Sagemaker using BlazingText model. Here is my code for running the estimator, hyperparameter tuning, deploying to container and model invocation. I am seeing "Attribute Error: cant set attribute". bt = sagemaker.estimator.Estimator(container, role, instance_count=1, instance_type=’ml.m5.large’, input_mode=’File’, output_path=s3_output_location) bt.set_hyperparameters(mode=’supervised’) Code for model tuning bt.fit(inputs=s3_channels) Code to deploy to ..

Read more

NLP/K-MEANS/PYTHON Hi all, Im currently doing a short-text clustering task of NLP. Im trying to cluster the short text by K-means. I have completed embedding the sentences(by using GLOVE) and feed to CNN, and then I used K-means to do clustering. In order to evalute the clusters better and display the result to people who ..

Read more

for example I want to save inevitable, unavoidable, certain, sure = "necessary" if mentioned words are using in my giving sentence, so my program automatically change these words into "necessary" and give me sentence for example it is inevitable or unavoidable or certain or sure, that person age should be 18 so my python program ..

Read more

I have a text full of emojis. import matplotlib.pyplot as plt from wordcloud import WordCloud wordcloud = WordCloud().generate(text) plt.imshow(wordcloud) plt.axis("off") plt.show() when i try to get a wordcloud for those emojis like the code above, it returns an error like this: ValueError: We need at least 1 word to plot a word cloud, got 0. ..

Read more