id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_31421413
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to compute precision, recall, accuracy and f1-score for the multiclass case with scikit learn?
How to compute precision, recall, accuracy and f1-score for the multiclass case with scikit learn? I'm working in a sentiment analysis problem the data looks like this: label instances 5 1190 4 838 3 239 1 204 2 127 So my data is unbalanced since 1190 instances are labeled with ...
https://stackoverflow.com/questions/31421413/how-to-compute-precision-recall-accuracy-and-f1-score-for-the-multiclass-case
python, machine-learning, scikit-learn, nlp
1,436,933,856
se_75473400
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is Spacy not executing the training pipeline even though the code runs without error?
Why is Spacy not executing the training pipeline even though the code runs without error? I am training a custom NER model with Spacy version 3.5.0 using some dummy data. My entire code and dummy data is given below. This is exact same code give in the 2nd half of this link. The code is running fine, but it only execu...
https://stackoverflow.com/questions/75473400/why-is-spacy-not-executing-the-training-pipeline-even-though-the-code-runs-witho
python, nlp, nltk, spacy, named-entity-recognition
1,676,556,372
se_78949607
stackoverflow
ARTIFICIAL_INTELLIGENCE
Trainer huggingface - RuntimeError: cannot pin 'torch.cuda.FloatTensor' only dense CPU tensors can be pinned
Trainer huggingface - RuntimeError: cannot pin 'torch.cuda.FloatTensor' only dense CPU tensors can be pinned I recently got the following error: RuntimeError: cannot pin 'torch.cuda.FloatTensor' only dense CPU tensors can be pinned when doing LoRA on a small LLM. I saw on a discord someone saying: The issue l...
https://stackoverflow.com/questions/78949607/trainer-huggingface-runtimeerror-cannot-pin-torch-cuda-floattensor-only-den
nlp, huggingface-transformers
1,725,466,158
se_78843104
stackoverflow
ARTIFICIAL_INTELLIGENCE
Transformers error: RuntimeError: Failed to import transformers.training_args
Transformers error: RuntimeError: Failed to import transformers.training_args I am trying to use transformers in a task of building a chatbot from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, GenerationConfig, TrainingArguments, trainer import torch import time import pandas as pd import random import num...
https://stackoverflow.com/questions/78843104/transformers-error-runtimeerror-failed-to-import-transformers-training-args
nlp, huggingface-transformers
1,723,025,533
se_69861444
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: "hypothesis" expects pre-tokenized hypothesis (Iterable[str]):
TypeError: "hypothesis" expects pre-tokenized hypothesis (Iterable[str]): I am trying to calculate the Meteor score for the following: print (nltk.translate.meteor_score.meteor_score( ["this is an apple", "that is an apple"], "an apple on this tree")) However I am getting this error every time and I am ...
https://stackoverflow.com/questions/69861444/typeerror-hypothesis-expects-pre-tokenized-hypothesis-iterablestr
python, nlp, nltk, metrics
1,636,172,779
se_79111733
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to derive attributes/labels from short plain text descriptions? (NER, LLM, ?)
How to derive attributes/labels from short plain text descriptions? (NER, LLM, ?) How to derive attributes/labels from short plain text descriptions? (NER, LLM, ?) I have short product descriptions that I’d like to transform into structured attributes. Example: Input: “La Lecciaia Cabernet Sauvignon 2017 – Red – 750ml...
https://stackoverflow.com/questions/79111733/how-to-derive-attributes-labels-from-short-plain-text-descriptions-ner-llm
nlp, artificial-intelligence, large-language-model, named-entity-recognition
1,729,544,096
se_76151553
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to import any Natural Language Processing Library for reference within my Unity project?
How to import any Natural Language Processing Library for reference within my Unity project? I want to import an opensource NLP library into my Unity project but no internet resource has worked and I can't figure out the issue but I assume it has to do with version compatibility. My project is quite up to date so I th...
https://stackoverflow.com/questions/76151553/how-to-import-any-natural-language-processing-library-for-reference-within-my-un
c#, unity-game-engine, nlp, opennlp
1,682,998,315
se_79100835
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I adjust the performance of tokenizer?
How can I adjust the performance of tokenizer? Working with the tokenizer from the transformers library of Hugging Face. The tokenizer works fine in most cases, but in some cases, it does not. I'm wondering if I can "adjust" (not train a new tokenizer from scratch) the performance of the tokenizer to handle the bad ca...
https://stackoverflow.com/questions/79100835/how-can-i-adjust-the-performance-of-tokenizer
nlp, huggingface-transformers, huggingface, huggingface-tokenizers
1,729,233,915
se_79102797
stackoverflow
ARTIFICIAL_INTELLIGENCE
Varying embedding dim due to changing padding in batch size
Varying embedding dim due to changing padding in batch size I want to train a simple neural network, which has embedding_dim as a parameter: class BoolQNN(nn.Module): def __init__(self, embedding_dim): super(BoolQNN, self).__init__() self.fc1 = nn.Linear(embedding_dim, 64) self.relu = nn.Re...
https://stackoverflow.com/questions/79102797/varying-embedding-dim-due-to-changing-padding-in-batch-size
python, text, nlp, padding, data-preprocessing
1,729,266,891
se_79102580
stackoverflow
ARTIFICIAL_INTELLIGENCE
What's going wrong in these weighted jaccard sum calculations for comparing the pronunciation of consonant clusters?
What's going wrong in these weighted jaccard sum calculations for comparing the pronunciation of consonant clusters? Context I have this code for my attempt to create a "similarity mapping" between consonants (or consonant clusters), to the same set of consonants/clusters (basically a cross product mapping), like ...
https://stackoverflow.com/questions/79102580/whats-going-wrong-in-these-weighted-jaccard-sum-calculations-for-comparing-the
algorithm, nlp, phonetics, jaccard-similarity
1,729,262,877
se_76984928
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make t-sne plots with BERT Models
How to make t-sne plots with BERT Models I have two text classification models https://huggingface.co/samanjoy2/banglaclickbert_finetuned_sequence_classification_clickbait https://huggingface.co/samanjoy2/banglabert_finetuned_sequence_classification_clickbait I want to plot their hidden states in a T-SNE plor. How can...
https://stackoverflow.com/questions/76984928/how-to-make-t-sne-plots-with-bert-models
nlp, text-classification, tsne
1,693,085,735
se_79101587
stackoverflow
ARTIFICIAL_INTELLIGENCE
Exporting a Longformer model to ONNX using optimum.exporters
Exporting a Longformer model to ONNX using optimum.exporters I have trained and finetuned a longformer model with my data. Now I am trying to export that into ONNX format, using optimum exporter. Since it's not supported off the bat (from what I can figure), I created my own config file. I'm not completely sure I'm do...
https://stackoverflow.com/questions/79101587/exporting-a-longformer-model-to-onnx-using-optimum-exporters
nlp, huggingface-transformers, onnx
1,729,245,915
se_71690297
stackoverflow
ARTIFICIAL_INTELLIGENCE
Large Language Model Perplexity
Large Language Model Perplexity i am currently using GPT-3 and i am trying to compare its capabilities to related language models for my masters thesis. Unfortunatly GPT-3 is an API based application, so i am not really able to extract metrics such as perplexity. Over the API i have acces to these three metrics and of...
https://stackoverflow.com/questions/71690297/large-language-model-perplexity
python, nlp, nltk, gpt-3, perplexity
1,648,719,696
se_78957322
stackoverflow
ARTIFICIAL_INTELLIGENCE
Break after first PER sequence found with Spacy
Break after first PER sequence found with Spacy I am trying to extract only the first speaker's name from a list of texts using spaCy. Currently, my function returns all "PER" tags, but I want to reduce the overhead and get only the first contiguous sequence of "PER" entities. Here’s the example output I get: Detected...
https://stackoverflow.com/questions/78957322/break-after-first-per-sequence-found-with-spacy
python, nlp, spacy
1,725,628,472
se_79084965
stackoverflow
ARTIFICIAL_INTELLIGENCE
Array Bounds Overrun inside of ML.NET - at my wits end
Array Bounds Overrun inside of ML.NET - at my wits end At my wits end... T5.omnx - ML.Net implementation trying to get down into text summarization... Have this text harness - guts of which are below - the harnes is simple proof of component usability... I have tried a number of T5 models - all wind me to the same dea...
https://stackoverflow.com/questions/79084965/array-bounds-overrun-inside-of-ml-net-at-my-wits-end
c#, nlp, ml.net
1,728,887,750
se_79081924
stackoverflow
ARTIFICIAL_INTELLIGENCE
With spaCy, how can I get all lemmas from a string?
With spaCy, how can I get all lemmas from a string? I have a pandas data frame with a column of text values (documents). I want to apply lemmatization on these values with the spaCy library using the pandas apply function. I've defined my to_lemma function to iterate through the words in the document and concatenate...
https://stackoverflow.com/questions/79081924/with-spacy-how-can-i-get-all-lemmas-from-a-string
python, pandas, nlp, spacy, lemmatization
1,728,767,001
se_59384146
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why do Transformers in Natural Language Processing need a stack of encoders?
Why do Transformers in Natural Language Processing need a stack of encoders? I am following this blog on transformers http://jalammar.github.io/illustrated-transformer/ The only thing I don't understand is why there needs to be a stack of encoders or decoders. I understand that the multi-headed attention layers capt...
https://stackoverflow.com/questions/59384146/why-do-transformers-in-natural-language-processing-need-a-stack-of-encoders
machine-learning, deep-learning, nlp, transformer-model
1,576,630,646
se_79010018
stackoverflow
ARTIFICIAL_INTELLIGENCE
AutoModelForSequenceClassification loss not decrease
AutoModelForSequenceClassification loss not decrease from datasets import load_dataset from torch.utils.data import DataLoader from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch from tqdm import tqdm def train_one_epoch(model, dataloader, optimizer): model.train() loss_lis...
https://stackoverflow.com/questions/79010018/automodelforsequenceclassification-loss-not-decrease
python, machine-learning, nlp, huggingface-transformers, huggingface
1,726,935,890
se_79028498
stackoverflow
ARTIFICIAL_INTELLIGENCE
Medspacy can not detect any entity although it exists
Medspacy can not detect any entity although it exists I am working in a text that contains biomedical entities. However medspacy package failed to detect those: import medspacy nlp = medspacy.load() text = "The patient was treated with warfarin for atrial fibrillation." doc = nlp(text) for ent in doc.ents: pr...
https://stackoverflow.com/questions/79028498/medspacy-can-not-detect-any-entity-although-it-exists
nlp, nltk, spacy, medical
1,727,371,453
se_79068388
stackoverflow
ARTIFICIAL_INTELLIGENCE
Replace Prediction Head for XLM-RoBERTa-Base
Replace Prediction Head for XLM-RoBERTa-Base I want to replace the XLM-RoBERTa-Base prediction head for a NER task (9 tags) with the weights for very specific words. For example, for the NER tag "B-PER" I would like to use the weights from the XLM-RoBERTa vocabulary for the word "George". The words for the individual ...
https://stackoverflow.com/questions/79068388/replace-prediction-head-for-xlm-roberta-base
pytorch, nlp, huggingface-transformers, named-entity-recognition, roberta-language-model
1,728,444,093
se_79073763
stackoverflow
ARTIFICIAL_INTELLIGENCE
facebook/m2m100_418M model - how to translate longer sequences of text
facebook/m2m100_418M model - how to translate longer sequences of text I have this extracted the following text from Wikipedia's Wiki (https://en.wikipedia.org/wiki/Wiki), A wiki is a form of hypertext publication on the internet which is collaboratively edited and managed by its audience directly through a web browse...
https://stackoverflow.com/questions/79073763/facebook-m2m100-418m-model-how-to-translate-longer-sequences-of-text
python, facebook, nlp, huggingface-transformers, machine-translation
1,728,553,520
se_79075644
stackoverflow
ARTIFICIAL_INTELLIGENCE
My llama2 model is talking to itself asking question and answering it to them using Conversational retrieval chain
My llama2 model is talking to itself asking question and answering it to them using Conversational retrieval chain I was implementing RAG on a document with using the LLama2 model but my model is asking questions to itself and answering it to them. llm = LlamaCpp(model_path=model_path, temperature=0, max_token...
https://stackoverflow.com/questions/79075644/my-llama2-model-is-talking-to-itself-asking-question-and-answering-it-to-them-us
python, nlp, large-language-model, rag, llama-cpp-python
1,728,583,426
se_70501324
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to predict the probability of an empty string using BERT
How to predict the probability of an empty string using BERT Suppose we have a template sentence like this: "The ____ house is our meeting place." and we have a list of adjectives to fill in the blank, e.g.: "yellow" "large" "" Note that one of these is an empty string. The goal is to compare the probabilities to ...
https://stackoverflow.com/questions/70501324/how-to-predict-the-probability-of-an-empty-string-using-bert
python, nlp, huggingface-transformers, bert-language-model
1,640,646,776
se_79073612
stackoverflow
ARTIFICIAL_INTELLIGENCE
Accented characters in Presidio deny list not being recognized despite correct YAML encoding
Accented characters in Presidio deny list not being recognized despite correct YAML encoding I'm using Microsoft Presidio for text analysis and anonymization, and I have a configuration file (all-config.yml) to specify recognizers, including some deny lists with accented characters. However, I am facing an issue where...
https://stackoverflow.com/questions/79073612/accented-characters-in-presidio-deny-list-not-being-recognized-despite-correct-y
python, nlp, yaml, text-processing, presidio
1,728,551,615
se_74772411
stackoverflow
ARTIFICIAL_INTELLIGENCE
TTS Voice Cloning
TTS Voice Cloning I have used coqui's open-source repository to build a voice clone model. It makes use of different tts_models trained using LJSpeech datasets. I used the multilingual model to use the sample that I have provided. However, I have been getting this error: ValueError: [!] Look like you use a multi-ling...
https://stackoverflow.com/questions/74772411/tts-voice-cloning
python, linux, deep-learning, nlp, text-to-speech
1,670,854,464
se_64898002
stackoverflow
ARTIFICIAL_INTELLIGENCE
Apertium + Python: POS-tagger not providing surface form
Apertium + Python: POS-tagger not providing surface form I'm trying to POS-tag some sentences in Italian with Apertium's tagger. While according to the Apertium GitHub page I am supposed to get as output also the surface form in addition to the morphological analysis, I only get the analysis. I want also the surface f...
https://stackoverflow.com/questions/64898002/apertium-python-pos-tagger-not-providing-surface-form
python, nlp, pos-tagger, morphological-analysis, apertium
1,605,719,748
se_61574364
stackoverflow
ARTIFICIAL_INTELLIGENCE
Reaching the main word from the suffix list
Reaching the main word from the suffix list I have a word like "itibarsızlaştırmak". The stem is "itibar" and the suffix list is "a, ak, ar, ı, laş, m, sız, i". The suffix list is missing. "ma, tır, ız, i, ı, a, m, sı, mak, tı, sız, ak, ar, laş" is the right one. How can i to reach "itibarsızlaştırmak" with suffix...
https://stackoverflow.com/questions/61574364/reaching-the-main-word-from-the-suffix-list
c#, nlp, morphological-analysis
1,588,508,540
se_53023382
stackoverflow
ARTIFICIAL_INTELLIGENCE
Print all the tokens in the file that are labelled with the morphological tag
Print all the tokens in the file that are labelled with the morphological tag I want to print all the tokens which are labellad with the morphological tag in a file. So far I wrote the code shown below. def index(filepath, string): import re pattern = re.compile(r'(\w+)+') StringList = [] StringList....
https://stackoverflow.com/questions/53023382/print-all-the-tokens-in-the-file-that-are-labelled-with-the-morphological-tag
python, regex, nlp, morphological-analysis
1,540,653,614
se_44034496
stackoverflow
ARTIFICIAL_INTELLIGENCE
In NLTK, Can I do morphological analysis for specific language
In NLTK, Can I do morphological analysis for specific language I am trying to add some arabic features into the NLTK, but some tasks such as stemming need a morphological analysis. Is there any way to define the morphological features of specific language such as Arabic to NLTK or I must to customize the analyzer?
https://stackoverflow.com/questions/44034496/in-nltk-can-i-do-morphological-analysis-for-specific-language
python, nlp, nltk, morphological-analysis
1,495,053,971
se_33779230
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get wordforms in sphinx?
How to get wordforms in sphinx? How i can get all morphology forms of the word? For example, searching keyword is: runner Result should be: run,running ... etc
https://stackoverflow.com/questions/33779230/how-to-get-wordforms-in-sphinx
nlp, sphinx, morphological-analysis
1,447,847,188
se_13858983
stackoverflow
ARTIFICIAL_INTELLIGENCE
Increasing relevancy of search results
Increasing relevancy of search results I have a problem with making search output more practically usefull for the end users. The problem is rather related to the algorithm and approach then to exact technology or framework to use. At the moment we have a database of products, that can be described with following sch...
https://stackoverflow.com/questions/13858983/increasing-relevancy-of-search-results
algorithm, search, nlp, full-text-search, search-engine
1,355,398,585
se_16053381
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can morph dictionary be built using postgresql?
How can morph dictionary be built using postgresql? I need to create special morphological vocabulary for a natural language. Each word should contain a set of characteristics. Does PostgreSQL 9.* help in such situation? I mean: should I create table from the scratch or there are some predefined means?
https://stackoverflow.com/questions/16053381/how-can-morph-dictionary-be-built-using-postgresql
postgresql, dictionary, nlp, morphological-analysis
1,366,181,383
se_24098658
stackoverflow
ARTIFICIAL_INTELLIGENCE
Morphological text analysis with Python using *.dic *.aff
Morphological text analysis with Python using *.dic *.aff I have 2 files in hunspell format(.dic and .aff) for Ukrainian language. My program has to get base form of the input word. So, it can use word form from .dic file and affices from .aff files. I don't know how to achieve this even with Hunspell util, but suppos...
https://stackoverflow.com/questions/24098658/morphological-text-analysis-with-python-using-dic-aff
python, nlp, hunspell, morphological-analysis
1,402,154,321
se_26052603
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to plot Japanese string-based data in Python
How to plot Japanese string-based data in Python I have a csv like this: Date, i, eat, chicken, you, fish, banana 2014-9-14, 1, 2, 1, 1, 1, 0 2014-10-15, 1, 1, 1, 0, 0, 0 2014-11-13, 0, 1, 0, 1, 0, 1 Forget about upper/lowercase and stemming because I will be morphological analyzing Japanese texts. Ultimate Goal: ...
https://stackoverflow.com/questions/26052603/how-to-plot-japanese-string-based-data-in-python
python, string, nlp, python-ggplot, morphological-analysis
1,411,709,071
se_26484377
stackoverflow
ARTIFICIAL_INTELLIGENCE
In python NLTK, I want to get morphological analysis result on non-whitespace string
In python NLTK, I want to get morphological analysis result on non-whitespace string I want to get a morphological analysis result from NLTK on a non-whitesapce string. For example: The string is "societynamebank". I want to get ['society', 'name', 'bank'] How to get that result on NLTK ?
https://stackoverflow.com/questions/26484377/in-python-nltk-i-want-to-get-morphological-analysis-result-on-non-whitespace-st
python, nlp, nltk, morphological-analysis
1,413,886,988
se_4627520
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to search a string for different tenses?
How to search a string for different tenses? I can use Stemmers, Filters etc. No problem. But what about this case, for example the source text contains the phrase: The fox made a jump. User has entered: fox AND make Results = 0; The question is how to process irregular forms of words?
https://stackoverflow.com/questions/4627520/how-to-search-a-string-for-different-tenses
forms, nlp, lucene.net, morphological-analysis
1,294,416,646
se_680907
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a free library for morphological analysis of the German language?
Is there a free library for morphological analysis of the German language? I'm looking for a library which can perform a morphological analysis on German words, i.e. it converts any word into its root form and providing meta information about the analysed word. For example: gegessen -> essen wurde [...] gefasst -> f...
https://stackoverflow.com/questions/680907/is-there-a-free-library-for-morphological-analysis-of-the-german-language
nlp, languagetool, morphological-analysis
1,237,974,717
se_77963718
stackoverflow
ARTIFICIAL_INTELLIGENCE
Are [INST] and [/INST] needed for mistral chat?
Are [INST] and [/INST] needed for mistral chat? On the page Open-weight models, they use [INST] and [/INST] in the template. (If I understood correctly, they fined tuned the basic text completion model on a dataset of instructions with the format <s>[INST] Instruction [/INST] Model answer</s>[INST] Follow-up instructi...
https://stackoverflow.com/questions/77963718/are-inst-and-inst-needed-for-mistral-chat
nlp, mistral-7b
1,707,413,566
se_6082415
stackoverflow
ARTIFICIAL_INTELLIGENCE
Creating tree data structure
Creating tree data structure i have some data: A AXNHJNEHWXNOECMEJK DNFJNXYEEQWhsdbchjsxs XMJQWsdsEOJdfsKMDJE .... Each row is array and each letter is object. I have comparer function which could say that letter A is equavalent of letter a(actually it is not letter. It's russian words and comparer function use mo...
https://stackoverflow.com/questions/6082415/creating-tree-data-structure
c#, algorithm, nlp, morphological-analysis
1,305,988,667
se_56161468
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is part-of-speech tag for Adjectives &#39;JJ&#39;?
Why is part-of-speech tag for Adjectives &#39;JJ&#39;? What is the etymology for JJ tag denoting POS for adjectives? I am unable to find any references online. There are several resources listing all the tags, but none describing the reason.
https://stackoverflow.com/questions/56161468/why-is-part-of-speech-tag-for-adjectives-jj
nlp
1,557,984,940
se_59344316
stackoverflow
ARTIFICIAL_INTELLIGENCE
detect dates in spacy
detect dates in spacy Is there a way to write a rule based system to catch things like start/end dates from a contract text. Here are a few real examples. I am bolding the date entities which I want spacy to automatically detect. If you have other ideas different than spacy that is also OK! The initial term of this ...
https://stackoverflow.com/questions/59344316/detect-dates-in-spacy
python, nlp, spacy, named-entity-recognition
1,576,416,319
se_79053957
stackoverflow
ARTIFICIAL_INTELLIGENCE
Keras MultiHeadAttention and padding mask warnings
Keras MultiHeadAttention and padding mask warnings I'm creating a transformer model with tensorflow/keras. First time using tensorflow. I'm using a MultiHeadAttention-layer. My input is zero-padded, and has a mask. I get warnings about the mask being discarded. But it seems like the mask is indeed used. This is a simp...
https://stackoverflow.com/questions/79053957/keras-multiheadattention-and-padding-mask-warnings
tensorflow, machine-learning, keras, nlp
1,728,039,676
se_79061427
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do I freeze only some embedding indices with tied embeddings?
How do I freeze only some embedding indices with tied embeddings? I found in Is it possible to freeze only certain embedding weights in the embedding layer in pytorch? a nice way to freeze only some indices of an embedding layer. However, while including it in a BERT model, I cannot find a way to tie those embeddings....
https://stackoverflow.com/questions/79061427/how-do-i-freeze-only-some-embedding-indices-with-tied-embeddings
python, pytorch, nlp, bert-language-model, word-embedding
1,728,294,138
se_70205743
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Export Stanza to ONNX format?
How to Export Stanza to ONNX format? How to export Stanza to ONNX format? It seems impossible to just simply train the model.
https://stackoverflow.com/questions/70205743/how-to-export-stanza-to-onnx-format
machine-learning, nlp, onnx, onnxruntime, stanza
1,638,475,167
se_78665040
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do RNNs handle negation in sentiment analysis
How do RNNs handle negation in sentiment analysis I'm trying to understand how Recurrent Neural Networks (RNNs), such as LSTM or GRU models or just a simple RNN, handle negation in sentiment analysis. Specifically, I'm curious about how these models manage to correctly interpret sentences where negation changes the se...
https://stackoverflow.com/questions/78665040/how-do-rnns-handle-negation-in-sentiment-analysis
nlp, recurrent-neural-network, sentiment-analysis
1,719,277,538
se_59031625
stackoverflow
ARTIFICIAL_INTELLIGENCE
InvalidArgumentError: indices[120,0] = 3080 is not in [0, 32) [[{{node embedding_6/embedding_lookup}}]]
InvalidArgumentError: indices[120,0] = 3080 is not in [0, 32) [[{{node embedding_6/embedding_lookup}}]] I have seen others have posted similar questions. But the difference is I'm running a Keras Functional API instead of a sequential model. from keras.models import Model from keras import layers from keras import In...
https://stackoverflow.com/questions/59031625/invalidargumenterror-indices120-0-3080-is-not-in-0-32-node-embedding
python, keras, nlp, lstm
1,574,684,093
se_77341101
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a method to extract quotes and their related speakers in the French language?
Is there a method to extract quotes and their related speakers in the French language? Is there a method to extract quote and their related speaker with the gestion of coreference? I want in output to get a dict with [{"speaker" : , "quotes": }] and if we don’t find the speaker, we put None to speaker and add "Potenti...
https://stackoverflow.com/questions/77341101/is-there-a-method-to-extract-quotes-and-their-related-speakers-in-the-french-lan
nlp, stanford-nlp, spacy-3
1,697,997,283
se_77666464
stackoverflow
ARTIFICIAL_INTELLIGENCE
Could not build wheels for camel-kenlm
Could not build wheels for camel-kenlm when trying to install camel-tools for python3.8 on MacOS machine using: pip install camel-tools ERROR: Failed building wheel for camel-kenlm Failed to build camel-kenlm ERROR: Could not build wheels for camel-kenlm, which is required to install pyproject.toml-based projects tri...
https://stackoverflow.com/questions/77666464/could-not-build-wheels-for-camel-kenlm
python, nlp
1,702,645,702
se_77490008
stackoverflow
ARTIFICIAL_INTELLIGENCE
cannot import name &#39;TypeAliasType&#39; from &#39;typing_extensions&#39; (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)
cannot import name &#39;TypeAliasType&#39; from &#39;typing_extensions&#39; (/usr/local/lib/python3.10/dist-packages/typing_extensions.py) I using elevenlab api for voice cloning in google colab. Here is my code import elevenlabs from elevenlabs import set_api_key set_api_key("*****************") It gives me this e...
https://stackoverflow.com/questions/77490008/cannot-import-name-typealiastype-from-typing-extensions-usr-local-lib-pyth
python, machine-learning, deep-learning, nlp, google-colaboratory
1,700,071,714
se_79034901
stackoverflow
ARTIFICIAL_INTELLIGENCE
Dataset for transformer
Dataset for transformer I'm making a model using transformer for code generation. I'm confused how to get input and output of data to train decoder only transformer my db is :- [ { "code": "def bubble_sort(arr):\n n = len(arr)\n for i in range(n):\n for j in range(0, n-i-1):\n if arr[...
https://stackoverflow.com/questions/79034901/dataset-for-transformer
machine-learning, nlp
1,727,547,945
se_73346095
stackoverflow
ARTIFICIAL_INTELLIGENCE
hugging face, Numpy is not available
hugging face, Numpy is not available CODE I AM RUNNING: from transformers import pipeline classifier = pipeline('sentiment-analysis') res = classifier("I Love Python.'") print(res) ERROR I AM GETTING: No model was supplied, defaulted to distilbert-base-uncased-finetuned-sst-2-english and revision af0f99b (https://...
https://stackoverflow.com/questions/73346095/hugging-face-numpy-is-not-available
python, numpy, nlp, huggingface-transformers
1,660,409,269
se_67783991
stackoverflow
ARTIFICIAL_INTELLIGENCE
Pytorch: RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one
Pytorch: RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one I am training a multilingual bert model for a sentiment classification task. I have 2 GPUs on 1 Machine so I am using Huggingface Accelerator for distributed training. But when I run the code it throws a Runtime...
https://stackoverflow.com/questions/67783991/pytorch-runtimeerror-expected-to-have-finished-reduction-in-the-prior-iteratio
python, python-3.x, nlp, pytorch, huggingface-transformers
1,622,530,423
se_78355243
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is merge in Byte Pair encoding (BPE) optimal?
Is merge in Byte Pair encoding (BPE) optimal? Let a string be s = "aeeefeekeelaeoae", Vocab: {a, e, f, k, l, o} (set of characters in s) Lets say I performed Byte Pair Encoding (BPE) on s and I want number of merges to be 2 such that my final vocab size becomes 8. "ee" gets merged first because it occurs the most. How...
https://stackoverflow.com/questions/78355243/is-merge-in-byte-pair-encoding-bpe-optimal
nlp, encode, tokenize, large-language-model, byte-pair-encoding
1,713,546,201
se_76669635
stackoverflow
ARTIFICIAL_INTELLIGENCE
Get chatGPT to respond with a single direct answer
Get chatGPT to respond with a single direct answer I am querying a text using chatGPT. But I need chatGPT to respond with single direct answers, rather than long stories or irrelevant text. Any way to achieve this? My code looks like: from langchain.document_loaders import TextLoader from langchain.vectorstores import...
https://stackoverflow.com/questions/76669635/get-chatgpt-to-respond-with-a-single-direct-answer
python, nlp, openai-api, langchain, chat-gpt-4
1,689,158,100
se_77951208
stackoverflow
ARTIFICIAL_INTELLIGENCE
Extracting and Identifying locations with NLP + Spacy
Extracting and Identifying locations with NLP + Spacy My goal is to be able to recognize (aka identify) and identify (aka name, retrieve an ID) locations from text using NLP. I'm using Spacy specifically. There are about 1,000 possible locations, but the difficulty is that they are unlikely to be written in a fully qu...
https://stackoverflow.com/questions/77951208/extracting-and-identifying-locations-with-nlp-spacy
nlp, spacy, named-entity-recognition
1,707,258,852
se_79021064
stackoverflow
ARTIFICIAL_INTELLIGENCE
SBERT Fine-tuning always stops before finish all epochs
SBERT Fine-tuning always stops before finish all epochs I'm working on a project using the SBERT pre-trained models (specifically MiniLM) for a text classification project with 995 classifications. I am following the steps laid out here for the most part and everything seems to run. My issue occurs when actually train...
https://stackoverflow.com/questions/79021064/sbert-fine-tuning-always-stops-before-finish-all-epochs
python, machine-learning, pytorch, nlp, bert-language-model
1,727,236,544
se_78974474
stackoverflow
ARTIFICIAL_INTELLIGENCE
What features to extract to cluster text?
What features to extract to cluster text? I want to make a classifier for text, which is further use to suggest the most similar text for a one given. The flow of the app is the following: extract the main 10 topics from the text, using a llm (it can choose from a 150 words pool) I make the word vector a binary vecto...
https://stackoverflow.com/questions/78974474/what-features-to-extract-to-cluster-text
machine-learning, nlp, cluster-analysis, text-processing, large-language-model
1,726,066,609
se_78485460
stackoverflow
ARTIFICIAL_INTELLIGENCE
&#39;SymbolicTensor&#39; object cannot be interpreted as an integer
&#39;SymbolicTensor&#39; object cannot be interpreted as an integer I have been trying to implement Peephole LSTM using Tensorflow, and I am getting the error below Error below is my model and I am not sure why I cant get the input layer in my model summary Model and below is my Call method for PeepholeLSTM Peephole L...
https://stackoverflow.com/questions/78485460/symbolictensor-object-cannot-be-interpreted-as-an-integer
python, tensorflow, nlp, lstm, language-model
1,715,792,492
se_28639544
stackoverflow
ARTIFICIAL_INTELLIGENCE
New York Times API through the command line
New York Times API through the command line I'm using the command line to tap into the New York Times API and running into issues. I get this: 'http' is not recognized as an internal or external command, operable program, or batch file when I run: http://api.nytimes.com/svc/search/v2/articlesearch.json?[q=obama]&...
https://stackoverflow.com/questions/28639544/new-york-times-api-through-the-command-line
command-line, nlp
1,424,472,321
se_79020177
stackoverflow
ARTIFICIAL_INTELLIGENCE
SpaCy not recognizing NORP (nationality)
SpaCy not recognizing NORP (nationality) nlp= spacy.load(en_core_web_lg-3.7.1) name = 'Las Palmas Mexican Restaurant & Bar' doc = nlp(name) for token in doc: print(f"{token.text} \t{token.ent_type_} \t{token.ent_iob_}") print('-----------------') Las ORG B Palmas ORG I Mexican ...
https://stackoverflow.com/questions/79020177/spacy-not-recognizing-norp-nationality
nlp, spacy
1,727,208,074
se_73290491
stackoverflow
ARTIFICIAL_INTELLIGENCE
The model did not return a loss from the inputs - LabSE error
The model did not return a loss from the inputs - LabSE error I want to fine tune LabSE for Question answering using squad dataset. and i got this error: ValueError: The model did not return a loss from the inputs, only the following keys: last_hidden_state,pooler_output. For reference, the inputs it received are inpu...
https://stackoverflow.com/questions/73290491/the-model-did-not-return-a-loss-from-the-inputs-labse-error
nlp, pytorch, huggingface-transformers, bert-language-model
1,660,041,805
se_60443948
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a way to turn Google Colab code into web services or rest APIs
Is there a way to turn Google Colab code into web services or rest APIs I have a Machine learning module which uses Google Colab's free GPU for NLP tasks, and I want to make a web app out of it. I've been thinking of using React js for frontend and spring boot for the back end and was wondering whether there is a way ...
https://stackoverflow.com/questions/60443948/is-there-a-way-to-turn-google-colab-code-into-web-services-or-rest-apis
python, machine-learning, nlp, google-colaboratory
1,582,852,230
se_62111614
stackoverflow
ARTIFICIAL_INTELLIGENCE
ScispaCy in google colab
ScispaCy in google colab I am trying to build NER model of clinical data using ScispaCy in colab. I have installed packages like this. !pip install spacy !pip install scispacy !pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.2.4/en_core_sci_md-0.2.4.tar.gz #pip install <Model URL>```...
https://stackoverflow.com/questions/62111614/scispacy-in-google-colab
python, nlp, spacy, named-entity-recognition
1,590,899,608
se_56470403
stackoverflow
ARTIFICIAL_INTELLIGENCE
Spacy nlp = spacy.load(&quot;en_core_web_lg&quot;)
Spacy nlp = spacy.load(&quot;en_core_web_lg&quot;) I already have spaCy downloaded, but everytime I try the nlp = spacy.load("en_core_web_lg"), command, I get this error: OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory. I...
https://stackoverflow.com/questions/56470403/spacy-nlp-spacy-loaden-core-web-lg
python, python-3.x, nlp, spacy
1,559,790,169
se_3708199
stackoverflow
ARTIFICIAL_INTELLIGENCE
Dealing with the example.cpp in CRF++ toolkit
Dealing with the example.cpp in CRF++ toolkit I am just starting to learn about the use of CRF++ toolkit. I downloaded the linux version of CRF++ 0.54 , When i try to compile the example.cpp under sdk/ with the command g++ -o example example.cpp there comes the problem: hpl@hpl-desktop:~/Documents/CRF/CRF++-0.54$ g++ ...
https://stackoverflow.com/questions/3708199/dealing-with-the-example-cpp-in-crf-toolkit
c++, nlp, crf++
1,284,461,749
se_79005985
stackoverflow
ARTIFICIAL_INTELLIGENCE
Seq2Seq trainer.train() keeps giving indexing error
Seq2Seq trainer.train() keeps giving indexing error I am trying to do a machine translation from Hindi to Sanskrit using NLLB model. But I keep getting the error: IndexError: Invalid key: 39463 is out of bounds for size 0. The error is coming when training the pretrained NLLB model `facebook/nllb-200-1.3B The input...
https://stackoverflow.com/questions/79005985/seq2seq-trainer-train-keeps-giving-indexing-error
python, nlp, huggingface-transformers, huggingface-trainer
1,726,821,812
se_78985137
stackoverflow
ARTIFICIAL_INTELLIGENCE
Alternative to device_map = &quot;auto&quot; in Huggingface Pretrained
Alternative to device_map = &quot;auto&quot; in Huggingface Pretrained I have a model that I was reading from huggingface using the following code: from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained(model_path) model = AutoModelForCausalLM.from_pretrained(model_path...
https://stackoverflow.com/questions/78985137/alternative-to-device-map-auto-in-huggingface-pretrained
machine-learning, deep-learning, nlp, huggingface-transformers
1,726,317,723
se_52047163
stackoverflow
ARTIFICIAL_INTELLIGENCE
Use Natural Language Processing to to Split Bad &amp; Good Comments from an Employee Survey
Use Natural Language Processing to to Split Bad &amp; Good Comments from an Employee Survey So bit of a long shot here, and I apologize for the lack of information. However, I'm struggling to even know where to look now. So I'm trying to split good and bad comments from a made-up survey of employees at a random comp...
https://stackoverflow.com/questions/52047163/use-natural-language-processing-to-to-split-bad-good-comments-from-an-employee
python, nlp, nltk
1,535,405,036
se_77050866
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why I am getting &quot;Notebook out of memory&quot; error upon notebook submission in Kaggle
Why I am getting &quot;Notebook out of memory&quot; error upon notebook submission in Kaggle I am participating in a Kaggle competition. Over the past 7-10 days I have been facing a peculiar problem. I am trying to make my submission to the competition, but am getting "Notebook out of memory" error again and again as ...
https://stackoverflow.com/questions/77050866/why-i-am-getting-notebook-out-of-memory-error-upon-notebook-submission-in-kagg
python, nlp, huggingface-transformers, kaggle, large-language-model
1,693,994,150
se_2264806
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to automatically determine text quality?
How to automatically determine text quality? A lot of Natural Language Processing (NLP) algorithms and libraries have a hard time working with random texts from the web, usually because they are presupposing clean, articulate writing. I can understand why that would be easier than parsing YouTube comments. My questio...
https://stackoverflow.com/questions/2264806/how-to-automatically-determine-text-quality
nlp
1,266,224,232
se_59962851
stackoverflow
ARTIFICIAL_INTELLIGENCE
Trouble fine tuning Huggingface GPT-2 on Colab -- Assertion error
Trouble fine tuning Huggingface GPT-2 on Colab -- Assertion error I wish to fine tune Huggingface's GPT-2 transformer model on my own text data. I want to do this on a Google Colab notebook. However, I have two problems. The first is that it doesn't seem to work. I install the various bits and pieces via the Colab: !g...
https://stackoverflow.com/questions/59962851/trouble-fine-tuning-huggingface-gpt-2-on-colab-assertion-error
python-3.x, nlp, artificial-intelligence, huggingface-transformers
1,580,285,459
se_78991079
stackoverflow
ARTIFICIAL_INTELLIGENCE
Generate Mock but realistic data using NLP
Generate Mock but realistic data using NLP I want to generate realistic test data. It should support customizable Fields, structure of data by specifying field names and types. It should support a wide range of data types, including names, addresses, email addresses, electrical products, household products etc. I plan...
https://stackoverflow.com/questions/78991079/generate-mock-but-realistic-data-using-nlp
nlp
1,726,505,641
se_78994219
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to parse complex patterns for scheduling?
How to parse complex patterns for scheduling? I implement parser for my university schedule (Innopolis University) from google spreadsheets to .ics files. It looks like this: Header (1st and 2nd rows) is Course and Group. On the left side - column with weekday and time. Each cell here represent schedule entry (they r...
https://stackoverflow.com/questions/78994219/how-to-parse-complex-patterns-for-scheduling
python, parsing, nlp, schedule, information-retrieval
1,726,578,499
se_12229661
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to identify adjectives or adverbs?
How to identify adjectives or adverbs? I am quite novice to NLP....Is there any API or a way in which i could identify verb or adjective or adverbs from a sentence? I need it in a project?
https://stackoverflow.com/questions/12229661/how-to-identify-adjectives-or-adverbs
nlp, sentiment-analysis, semantic-analysis
1,346,518,679
se_78991212
stackoverflow
ARTIFICIAL_INTELLIGENCE
Jupyter Lab kernel dies before starting the trainer.train()
Jupyter Lab kernel dies before starting the trainer.train() Working on fine-tuning phi-3.5-mini, and when trying to run the trainer.train() i am getting the following error: ***** Running training ***** Num examples = 647 Num Epochs = 3 Instantaneous batch size per device = 8 Total train batch size (w. paralle...
https://stackoverflow.com/questions/78991212/jupyter-lab-kernel-dies-before-starting-the-trainer-train
python, nlp, huggingface-transformers, slm-phi3
1,726,508,334
se_7290197
stackoverflow
ARTIFICIAL_INTELLIGENCE
Paraphrasing for Math Word Problems (Changing sentence structure without changing meaning)
Paraphrasing for Math Word Problems (Changing sentence structure without changing meaning) I'm working on Khan Academy's exercise framework, and more specifically, word problems. When doing a word problem exercise, students often get the same word problem, only with numbers and names changed. This is not ideal, as st...
https://stackoverflow.com/questions/7290197/paraphrasing-for-math-word-problems-changing-sentence-structure-without-changin
nlp
1,315,006,867
se_60043276
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValueError: With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters
ValueError: With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters I wrote a text classification program. When I run the program it crashes with an error as seen in this screenshot: ValueError: With n_samples=0, test_size=0.2 and train_...
https://stackoverflow.com/questions/60043276/valueerror-with-n-samples-0-test-size-0-2-and-train-size-none-the-resulting-t
python, scikit-learn, nlp
1,580,747,106
se_34197917
stackoverflow
ARTIFICIAL_INTELLIGENCE
Python fuzzy search and replace
Python fuzzy search and replace I need to perfom fuzzy search for sub-string in string and replace that part. For example: str_a = "Alabama" str_b = "REPLACED" orig_str = "Flabama is a state located in the southeastern region of the United States." print(fuzzy_replace(str_a, str_b, orig_str)) # fuzzy_replace code sho...
https://stackoverflow.com/questions/34197917/python-fuzzy-search-and-replace
python, string, nlp, fuzzy-search
1,449,739,332
se_78966943
stackoverflow
ARTIFICIAL_INTELLIGENCE
How are the weights of the Mistral models reinitialized in Huggingface?
How are the weights of the Mistral models reinitialized in Huggingface? From How does one reinitialize the weights of a Hugging Face LLaMA v2 model the official way as the original model? and https://discuss.huggingface.co/t/how-does-one-reinitialize-the-weights-of-a-hugging-face-llama-v2-model-the-official-way-as-the...
https://stackoverflow.com/questions/78966943/how-are-the-weights-of-the-mistral-models-reinitialized-in-huggingface
nlp, huggingface-transformers, large-language-model, mistral-7b
1,725,909,952
se_74519464
stackoverflow
ARTIFICIAL_INTELLIGENCE
AttributeError: &#39;tuple&#39; object has no attribute &#39;rank&#39; when calling model.fit() in NLP task
AttributeError: &#39;tuple&#39; object has no attribute &#39;rank&#39; when calling model.fit() in NLP task I'm following this tutorial https://towardsdatascience.com/another-twitter-sentiment-analysis-with-python-part-9-neural-networks-with-tfidf-vectors-using-d0b4af6be6d7 However, while implementing the ANN based on...
https://stackoverflow.com/questions/74519464/attributeerror-tuple-object-has-no-attribute-rank-when-calling-model-fit
python, keras, neural-network, nlp, tf-idf
1,669,036,131
se_78960441
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLaMA 3.1 Fine-tuning with QLoRA - CUDA Out of Memory Error
LLaMA 3.1 Fine-tuning with QLoRA - CUDA Out of Memory Error I'm trying to fine-tune the LLaMA 3.1 8 billion parameters model using the QLoRA technique with the help of the 4-bit bitsandbytes library on a mental health conversations dataset from Hugging Face. However, when I run the code, I'm encountering a torch.cuda....
https://stackoverflow.com/questions/78960441/llama-3-1-fine-tuning-with-qlora-cuda-out-of-memory-error
nlp, artificial-intelligence, large-language-model, llama, fine-tuning
1,725,721,026
se_78967452
stackoverflow
ARTIFICIAL_INTELLIGENCE
extracting word embeddings from log probabilities
extracting word embeddings from log probabilities I am solving an image captioning related issue and eventually I have extract the embeddings of the tokens. One possible way is to extract the embeddings using the tokens. But I cannot do do that because in my case the whole process needs to be differentiable and the to...
https://stackoverflow.com/questions/78967452/extracting-word-embeddings-from-log-probabilities
pytorch, nlp, word-embedding
1,725,924,376
se_65802782
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use pretrained BERT word embedding vector to finetune (initialize) other networks?
How to use pretrained BERT word embedding vector to finetune (initialize) other networks? When I used to do classification work with textcnn, I had experience finetuning textcnn using pretrained word embedding with like Word2Vec and fasttext. And I use this process: Create an embedding layer in textcnn Load the embed...
https://stackoverflow.com/questions/65802782/how-to-use-pretrained-bert-word-embedding-vector-to-finetune-initialize-other
machine-learning, nlp, pytorch, conv-neural-network, bert-language-model
1,611,114,201
se_60381170
stackoverflow
ARTIFICIAL_INTELLIGENCE
Which Deep Learning Algorithm does Spacy uses when we train Custom model?
Which Deep Learning Algorithm does Spacy uses when we train Custom model? When we train custom model, I do see we have dropout and n_iter parameters to tune, but which deep learning algorithm does Spacy Uses to train Custom Models? Also, when Adding new Entity type is it good to create blank or train it on existing mo...
https://stackoverflow.com/questions/60381170/which-deep-learning-algorithm-does-spacy-uses-when-we-train-custom-model
nlp, spacy, named-entity-recognition
1,582,565,632
se_53772907
stackoverflow
ARTIFICIAL_INTELLIGENCE
No such file or directory &#39;nltk_data/corpora/stopwords/English&#39; when using colab
No such file or directory &#39;nltk_data/corpora/stopwords/English&#39; when using colab First of all I am using Google colab for the work and I have downloaded nltk stopwords for English with following: nltk.download('stopwords') The download was successful [nltk_data] Downloading package stopwords to /root/nltk_...
https://stackoverflow.com/questions/53772907/no-such-file-or-directory-nltk-data-corpora-stopwords-english-when-using-colab
python, nlp, nltk, google-colaboratory
1,544,756,171
se_78338438
stackoverflow
ARTIFICIAL_INTELLIGENCE
Reading Documents Directly from Llama Index as Files Instead of Specifying a Folder Path
Reading Documents Directly from Llama Index as Files Instead of Specifying a Folder Path I'm using llama index and want to directly read documents as files instead of specifying the folder path as described in the official documentation. The current method assumes that llama index users always have a downloaded file i...
https://stackoverflow.com/questions/78338438/reading-documents-directly-from-llama-index-as-files-instead-of-specifying-a-fol
nlp, openai-api, large-language-model, llama, llama-index
1,713,329,536
se_78951976
stackoverflow
ARTIFICIAL_INTELLIGENCE
Slow GPT4All with Python SDK
Slow GPT4All with Python SDK I'm trying to run some analysis on thousands of text files, and I would like to use gtp4all (In python) to provide some responses. I've been trying to use the model on a sample text file here. Here's my code: llama_path = r"C:\Users\User\AppData\Local\nomic.ai\GPT4All\Meta-Llama-3.1-8B-Ins...
https://stackoverflow.com/questions/78951976/slow-gpt4all-with-python-sdk
python, nlp, artificial-intelligence, large-language-model, gpt4all
1,725,524,340
se_78951906
stackoverflow
ARTIFICIAL_INTELLIGENCE
RASA [3.6.20] NLU model &quot;training successfully&quot; immediately but only returning &#39;null&#39;
RASA [3.6.20] NLU model &quot;training successfully&quot; immediately but only returning &#39;null&#39; I am trying to upgrade from RASA 2 to RASA 3, and am having a problem I don’t understand. I’m trying to train an NLU model, and when I run the ‘rasa train’ command I get terminal output indicating that my model has ...
https://stackoverflow.com/questions/78951906/rasa-3-6-20-nlu-model-training-successfully-immediately-but-only-returning
nlp, named-entity-recognition, rasa, rasa-nlu
1,725,523,230
se_78946820
stackoverflow
ARTIFICIAL_INTELLIGENCE
Vector search to get a uniqueness score based on context
Vector search to get a uniqueness score based on context I have a single blog post with a title and description, and I want to compare its uniqueness against multiple blog entries in a CSV file. The CSV contains several blogs, each with a title and meta description. I am currently using TF-IDF vectorization and cosine...
https://stackoverflow.com/questions/78946820/vector-search-to-get-a-uniqueness-score-based-on-context
python, machine-learning, vector, nlp, text-processing
1,725,424,073
se_77097820
stackoverflow
ARTIFICIAL_INTELLIGENCE
Rewrite sentences from first person to third person and vice versa using python packages
Rewrite sentences from first person to third person and vice versa using python packages Are there any packages in python that can rewrite large content from Person's point of view i.e first person to third person and Third person to First person I ate apple yesterday He ate apple yesterday I have tried to replace t...
https://stackoverflow.com/questions/77097820/rewrite-sentences-from-first-person-to-third-person-and-vice-versa-using-python
text, url-rewriting, nlp, spacy, grammar
1,694,613,703
se_59590993
stackoverflow
ARTIFICIAL_INTELLIGENCE
where can i download a pretrained word2vec map?
where can i download a pretrained word2vec map? I have been learning about NLP models and came across word embedding, and saw the examples in which it is possible to see relations between words by calculating their dot products and such. What I am looking for is just a dictionary, mapping words to their representativ...
https://stackoverflow.com/questions/59590993/where-can-i-download-a-pretrained-word2vec-map
python, nlp, word2vec, word-embedding
1,578,143,419
se_76198051
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to add new tokens to an existing Huggingface tokenizer?
How to add new tokens to an existing Huggingface tokenizer? How to add new tokens to an existing Huggingface AutoTokenizer? Canonically, there's this tutorial from Huggingface https://huggingface.co/learn/nlp-course/chapter6/2 but it ends on the note of "quirks when using existing tokenizers". And then it points to th...
https://stackoverflow.com/questions/76198051/how-to-add-new-tokens-to-an-existing-huggingface-tokenizer
python, nlp, huggingface-transformers, huggingface-tokenizers, large-language-model
1,683,528,092
se_78846004
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I use structured_output with Azure OpenAI with the openai Python library?
How can I use structured_output with Azure OpenAI with the openai Python library? I want to use structured output with Azure OpenAI. I tried the following code, based on the code given in https://openai.com/index/introducing-structured-outputs-in-the-api/: from pydantic import BaseModel from openai import AzureOpenAI ...
https://stackoverflow.com/questions/78846004/how-can-i-use-structured-output-with-azure-openai-with-the-openai-python-library
python, nlp, azure-openai, gpt-4
1,723,072,459
se_78937220
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to predict unlabels text data with predict_generator in keras?
How to predict unlabels text data with predict_generator in keras? I am trying to perform prediction on my NPL model using predict_generator, my test data does not have a Y variable. My purpose is to predict labels on future texts. I have tried 'Y_test=None' inside the generator, it gives me a positional error. I have...
https://stackoverflow.com/questions/78937220/how-to-predict-unlabels-text-data-with-predict-generator-in-keras
tensorflow, keras, nlp, generator
1,725,190,636
se_76357844
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to extract subtitles from Youtube videos in varied languages
How to extract subtitles from Youtube videos in varied languages I have used the code below to extract subtitles from YouTube videos, but it only works for videos in English. I have some videos in Spanish, so I would like to know how I can modify the code to extract Spanish subtitles too? from pytube import YouTube fr...
https://stackoverflow.com/questions/76357844/how-to-extract-subtitles-from-youtube-videos-in-varied-languages
python, web-scraping, nlp, youtube, video-streaming
1,685,367,304
se_78933232
stackoverflow
ARTIFICIAL_INTELLIGENCE
Keep training pytorch model on new data
Keep training pytorch model on new data I'm working on a text classification task and have decided to use a PyTorch model for this purpose. The process mainly involves the following steps: Load and process the text. Use a TF-IDF Vectorizer. Build the neural network and save the TF-IDF Vectorizer and model to predict ...
https://stackoverflow.com/questions/78933232/keep-training-pytorch-model-on-new-data
python, scikit-learn, pytorch, nlp, python-polars
1,725,040,079
se_78932356
stackoverflow
ARTIFICIAL_INTELLIGENCE
Capitalized words in sentiment analysis
Capitalized words in sentiment analysis I'm currently working with data of customers reviews on products from Sephora. my task to classify them to sentiments : negative, neutral , positive . A common technique of text preprocessing is to lower case all the words , but in this situation upper case words like 'AMAZING' ...
https://stackoverflow.com/questions/78932356/capitalized-words-in-sentiment-analysis
nlp, sentiment-analysis, bert-language-model, data-preprocessing
1,725,025,796
se_67097467
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is &quot;language modeling head&quot; in BertForMaskedLM
What is &quot;language modeling head&quot; in BertForMaskedLM I have recently read about BERT and want to use BertForMaskedLM for fill_mask task. I know about BERT architecture. Also, as far as I know, BertForMaskedLM is built from BERT with a language modeling head on top, but I have no idea about what language model...
https://stackoverflow.com/questions/67097467/what-is-language-modeling-head-in-bertformaskedlm
nlp, bert-language-model, huggingface-transformers, language-model
1,618,426,090
se_78928509
stackoverflow
ARTIFICIAL_INTELLIGENCE
Clustering for SBERT embedding
Clustering for SBERT embedding I have a set of sentences which I have transformed into vectors using SBERT embedding. I would like to cluster these vectors. When looking for informations online, I keep seeing post telling to do some classical clustering, either using KMeans (which then use the Euclidean distance), or ...
https://stackoverflow.com/questions/78928509/clustering-for-sbert-embedding
nlp, cluster-analysis, bert-language-model
1,724,944,283
se_50735252
stackoverflow
ARTIFICIAL_INTELLIGENCE
Efficient implementation of BPE using priority queue
Efficient implementation of BPE using priority queue I think that it is not strictly BPE (byte pair encoding), but there is a similar idea applied to strings. Suppose there are three Chinese words in the dictionary (I will use a huge dictionary like CEDICT for practical use.) 我 喜欢 水果 Then take an input like this ...
https://stackoverflow.com/questions/50735252/efficient-implementation-of-bpe-using-priority-queue
string, algorithm, nlp, compression
1,528,356,377