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_79507530
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to normalize ingredient names in a recipe dataset and handle NOUN + NOUN cases using spaCy in python?
How to normalize ingredient names in a recipe dataset and handle NOUN + NOUN cases using spaCy in python? I'm working on normalizing ingredient names from a recipe dataset using Python and spaCy. My goal is to extract only the relevant ingredients and ignore measurement units, fractions, and other unnecessary details....
https://stackoverflow.com/questions/79507530/how-to-normalize-ingredient-names-in-a-recipe-dataset-and-handle-noun-noun-cas
python, nlp, spacy
1,741,896,783
se_79498915
stackoverflow
ARTIFICIAL_INTELLIGENCE
Comparing the similarity of spoken and written form text
Comparing the similarity of spoken and written form text I'm converting spoken form text to its written form. For example, "he owes me two-thousand dollars" should be converted to "he owes me $2,000" . I want an automatic check, to judge if the conversion was right or not. Can i use sentence transformers to compare th...
https://stackoverflow.com/questions/79498915/comparing-the-similarity-of-spoken-and-written-form-text
nlp, large-language-model
1,741,632,959
se_58114417
stackoverflow
ARTIFICIAL_INTELLIGENCE
My model's loss value decreases slowly .how to reduce my loss faster while training?
My model's loss value decreases slowly .how to reduce my loss faster while training? when I train the model the loss decrease from 0.9 to 0.5 in 2500 epochs. Is it normal? my model: model = Sequential() model.add(Embedding(vocab_size , emd_dim, weights=[emd_matrix], input_length=maxLen,trainable=False)...
https://stackoverflow.com/questions/58114417/my-models-loss-value-decreases-slowly-how-to-reduce-my-loss-faster-while-train
tensorflow, keras, neural-network, deep-learning, nlp
1,569,492,445
se_62945590
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I transform verbs from present tense to past tense with using NLP library?
How can I transform verbs from present tense to past tense with using NLP library? What I would like to do I would like to transform verbs from present tense to past tense with using NLP library like below. As she leaves the kitchen, his voice follows her. #output As she left the kitchen, his voice followed her. Pr...
https://stackoverflow.com/questions/62945590/how-can-i-transform-verbs-from-present-tense-to-past-tense-with-using-nlp-librar
python, python-3.x, nlp, stanford-nlp, spacy
1,594,947,771
se_75901231
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I make sentence-BERT throw an exception if the text exceeds max_seq_length, and what is the max possible max_seq_length for all-MiniLM-L6-v2?
How can I make sentence-BERT throw an exception if the text exceeds max_seq_length, and what is the max possible max_seq_length for all-MiniLM-L6-v2? I'm using sentence-BERT from Huggingface in the following way: from sentence_transformers import SentenceTransformer model = SentenceTransformer('all-MiniLM-L6-v2') mode...
https://stackoverflow.com/questions/75901231/how-can-i-make-sentence-bert-throw-an-exception-if-the-text-exceeds-max-seq-leng
nlp, huggingface-transformers, bert-language-model, huggingface-tokenizers, sentence-transformers
1,680,283,794
se_79488426
stackoverflow
ARTIFICIAL_INTELLIGENCE
Upserting in Pinecone takes too long
Upserting in Pinecone takes too long I'm trying to upsert reviews that i've scraped into pinecone. For the embedding model im using jina-embedding-v3. For 204 reviews this takes around 2.5 hours! in Colab. Tried using GPU but the embeddings arent using GPU. Am i doing something wrong? Is there a way that i can speed u...
https://stackoverflow.com/questions/79488426/upserting-in-pinecone-takes-too-long
python, nlp, rag, pinecone
1,741,242,155
se_9756653
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I run an input file on the porter stemmer java code?
How can I run an input file on the porter stemmer java code? How can I run an input file on the porter stemmer java code?
https://stackoverflow.com/questions/9756653/how-can-i-run-an-input-file-on-the-porter-stemmer-java-code
java, nlp, porter-stemmer
1,332,054,539
se_79501263
stackoverflow
ARTIFICIAL_INTELLIGENCE
Calculate the gradient with respect to attention but also the FFN layers for a pre-trained LLMs
Calculate the gradient with respect to attention but also the FFN layers for a pre-trained LLMs I would like to return the gradient with respect to specific layers and the FFN layer in the Transformer architecture of pre-trained LLMs from the hugging-face model. Is that even possible? I am working with the code of thi...
https://stackoverflow.com/questions/79501263/calculate-the-gradient-with-respect-to-attention-but-also-the-ffn-layers-for-a-p
python, pytorch, nlp, large-language-model
1,741,706,517
se_60352003
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Download webpage as .mhtml
How to Download webpage as .mhtml I am able to successfully open a URL and save the resultant page as a .html file. However, I am unable to determine how to download and save a .mhtml (Web Page, Single File). My code is: import urllib.parse, time from urllib.parse import urlparse import urllib.request url = ('http...
https://stackoverflow.com/questions/60352003/how-to-download-webpage-as-mhtml
python-3.x, nlp, arabic
1,582,373,291
se_90580
stackoverflow
ARTIFICIAL_INTELLIGENCE
Word frequency algorithm for natural language processing
Word frequency algorithm for natural language processing Without getting a degree in information retrieval, I'd like to know if there exists any algorithms for counting the frequency that words occur in a given body of text. The goal is to get a "general feel" of what people are saying over a set of textual comments....
https://stackoverflow.com/questions/90580/word-frequency-algorithm-for-natural-language-processing
algorithm, nlp, word-frequency
1,221,720,566
se_78862426
stackoverflow
ARTIFICIAL_INTELLIGENCE
Unable to use nltk functions
Unable to use nltk functions I was trying to run some nltk functions on the UCI spam message dataset but ran into this problem of word_tokenize not working even after downloading dependencies. import nltk nltk.download('punkt') from nltk.tokenize import word_tokenize df['text'].apply(lambda x: len(nltk.word_tokenize(...
https://stackoverflow.com/questions/78862426/unable-to-use-nltk-functions
python, machine-learning, nlp, nltk
1,723,475,849
se_28314337
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: sparse matrix length is ambiguous; use getnnz() or shape[0] while using RF classifier?
TypeError: sparse matrix length is ambiguous; use getnnz() or shape[0] while using RF classifier? I am learning about random forests in scikit learn and as an example I would like to use Random forest classifier for text classification, with my own dataset. So first I vectorized the text with tfidf and for classificat...
https://stackoverflow.com/questions/28314337/typeerror-sparse-matrix-length-is-ambiguous-use-getnnz-or-shape0-while-usi
python, numpy, machine-learning, nlp, scikit-learn
1,423,028,915
se_79130264
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Load a 4-bit Quantized VLM Model from Hugging Face with Transformers?
How to Load a 4-bit Quantized VLM Model from Hugging Face with Transformers? Iโ€™m new to quantization and working with visual language models (VLM).Iโ€™m trying to load a 4-bit quantized version of the Ovis1.6-Gemma model from Hugging Face using the transformers library. I downloaded the model from this link: https://hug...
https://stackoverflow.com/questions/79130264/how-to-load-a-4-bit-quantized-vlm-model-from-hugging-face-with-transformers
python, nlp, huggingface-transformers, huggingface, quantization
1,730,021,481
se_23178275
stackoverflow
ARTIFICIAL_INTELLIGENCE
Text classification in python - (NLTK Sentence based)
Text classification in python - (NLTK Sentence based) I need to classify text and i am using Text blob python module to achieve it.I can use either Naive Bayes classifier/Decision tree. I am concern about the below mentioned points. I Need to classify sentences as argument/ Not an argument. I am using two classifiers...
https://stackoverflow.com/questions/23178275/text-classification-in-python-nltk-sentence-based
python, machine-learning, nlp, text-classification
1,397,966,487
se_77701433
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValueError: You are trying to offload the whole model to the disk. Please use the `disk_offload` function instead
ValueError: You are trying to offload the whole model to the disk. Please use the `disk_offload` function instead I am trying to run a GitHub project on my computer. GitHub Repo that I am trying to run This is the code snippet that is causing errors. Steps I took for replicating the project are: Cloned the repositor...
https://stackoverflow.com/questions/77701433/valueerror-you-are-trying-to-offload-the-whole-model-to-the-disk-please-use-th
python, nlp, large-language-model, pre-trained-model, llama
1,703,211,929
se_47524602
stackoverflow
ARTIFICIAL_INTELLIGENCE
Wordcloud is cropping text
Wordcloud is cropping text I am using twitter API to generate sentiments. I am trying to generate a word-cloud based on tweets. Here is my code to generate a wordcloud wordcloud(clean.tweets, random.order=F,max.words=80, col=rainbow(50), scale=c(3.5,1)) Result for this: I also tried this: pal <- brewer.pal(8...
https://stackoverflow.com/questions/47524602/wordcloud-is-cropping-text
r, text-analysis, word-cloud, sttwitterapi
1,511,847,075
se_55131104
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to &quot;Create environment variable file with: touch .env for configuration (in project root).&quot;
How to &quot;Create environment variable file with: touch .env for configuration (in project root).&quot; basically just don't understand what this line means, did everything else already https://github.com/adityasarvaiya/Automatic_Question_Generation#environment-variables
https://stackoverflow.com/questions/55131104/how-to-create-environment-variable-file-with-touch-env-for-configuration-in
python, nlp, stanford-nlp
1,552,427,118
se_46541255
stackoverflow
ARTIFICIAL_INTELLIGENCE
MITIE library for NLP
MITIE library for NLP I am trying to understand how MITIE is integrated with Rasa. I wanted to know what exactly the MITIE file total_word_feature_extractor.dat contain? I dont find any good documentation about this.
https://stackoverflow.com/questions/46541255/mitie-library-for-nlp
python, neural-network, nlp, rasa-nlu
1,507,022,597
se_40453503
stackoverflow
ARTIFICIAL_INTELLIGENCE
Information extraction in Python
Information extraction in Python I am attempting to extract this type of information from the following paragraph structure: women_ran men_ran kids_ran walked 1 2 1 3 2 4 3 1 3 6 5 2 text = ["On Tuesday, one women ran on the street whil...
https://stackoverflow.com/questions/40453503/information-extraction-in-python
python, nlp, information-extraction, spacy
1,478,460,080
se_23506732
stackoverflow
ARTIFICIAL_INTELLIGENCE
Compare two phrases using WordNet?
Compare two phrases using WordNet? I am trying to compare the semantic of two phrases. In Python I am using nltk and difflib. First I am removing the stop words from the phrases, then I am using WordNetLemmatizer and PorterStemmer to normalise the words then I am comparing the rest with the SequenceMatcher of difflib....
https://stackoverflow.com/questions/23506732/compare-two-phrases-using-wordnet
nlp, nltk, wordnet, difflib, semantic-analysis
1,399,422,479
se_2037832
stackoverflow
ARTIFICIAL_INTELLIGENCE
semantic similarity between sentences
semantic similarity between sentences I'm doing a project. I need any opensource tool or technique to find the semantic similarity of two sentences, where I give two sentences as an input, and receive score (i.e.,semantic similarity) as an output. Any help?
https://stackoverflow.com/questions/2037832/semantic-similarity-between-sentences
java, machine-learning, nlp
1,263,144,584
se_23110657
stackoverflow
ARTIFICIAL_INTELLIGENCE
Understanding word2vec text representation
Understanding word2vec text representation I would like to implement the distance part of word2vec in my program. Unfortunately it's not in C/C++ or Python, but first I did not understand the non-binary representation. This is how I get the file ./word2vec -train text8-phrase -output vectorsphrase.txt -cbow 0 -size 30...
https://stackoverflow.com/questions/23110657/understanding-word2vec-text-representation
nlp, word2vec
1,397,654,281
se_74151249
stackoverflow
ARTIFICIAL_INTELLIGENCE
Bertopic assign topics to data frame
Bertopic assign topics to data frame I have build a topic model with Bertopic. After getting topic how could I assign them to dataset. My main aim is to convert unsupervised topic modelling to supervised multi label classification problem.
https://stackoverflow.com/questions/74151249/bertopic-assign-topics-to-data-frame
python, machine-learning, nlp, bert-language-model, topic-modeling
1,666,342,935
se_27860652
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is the concept of negative-sampling in word2vec?
What is the concept of negative-sampling in word2vec? I'm reading the 2014 paper word2vec Explained: Deriving Mikolov et al.โ€™s Negative-Sampling Word-Embedding Method (note: direct download link) and it references the concept of "negative-sampling": Mikolov et al. present the negative-sampling approach as a more effi...
https://stackoverflow.com/questions/27860652/what-is-the-concept-of-negative-sampling-in-word2vec
machine-learning, nlp, word2vec
1,420,806,685
se_33374010
stackoverflow
ARTIFICIAL_INTELLIGENCE
Does Word2Vec has a hidden layer?
Does Word2Vec has a hidden layer? When I am reading one of papers of Tomas Mikolov: http://arxiv.org/pdf/1301.3781.pdf I have one concern on the Continuous Bag-of-Words Model section๏ผš The first proposed architecture is similar to the feedforward NNLM, where the non-linear hidden layer is removed and the projectio...
https://stackoverflow.com/questions/33374010/does-word2vec-has-a-hidden-layer
machine-learning, nlp, neural-network, word2vec
1,445,965,054
se_34363250
stackoverflow
ARTIFICIAL_INTELLIGENCE
Understanding Word2Vec&#39;s Skip-Gram Structure and Output
Understanding Word2Vec&#39;s Skip-Gram Structure and Output I have a two-fold question about the Skip-Gram model in Word2Vec: The first part is about structure: as far as I understand it, the Skip-Gram model is based on one neural network with one input weight matrix W, one hidden layer of size N, and C output weight...
https://stackoverflow.com/questions/34363250/understanding-word2vecs-skip-gram-structure-and-output
vector, machine-learning, nlp, word2vec
1,450,469,528
se_49732976
stackoverflow
ARTIFICIAL_INTELLIGENCE
what actually word embedding dimensions values represent?
what actually word embedding dimensions values represent? I have a doubt in word2vec and word embedding, I have downloaded GloVe pre-trained word embedding (shape 40,000 x 50) and using this function to extract information from that: import numpy as np def loadGloveModel(gloveFile): print ("Loading Glove Model") ...
https://stackoverflow.com/questions/49732976/what-actually-word-embedding-dimensions-values-represent
machine-learning, nlp, word2vec, word-embedding
1,523,276,842
se_29381505
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why does word2vec use 2 representations for each word?
Why does word2vec use 2 representations for each word? I am trying to understand why word2vec's skipgram model has 2 representations for each word (the hidden representation which is the word embedding) and the output representation (also called context word embedding) . Is this just for generality where the context c...
https://stackoverflow.com/questions/29381505/why-does-word2vec-use-2-representations-for-each-word
machine-learning, nlp, word2vec
1,427,852,681
se_79485287
stackoverflow
ARTIFICIAL_INTELLIGENCE
how to pass additional query filters to a SelfQueryRetriever?
how to pass additional query filters to a SelfQueryRetriever? We are implementing a SelfQueryRetriever using OpenSearch as vectorstore, in general it works fine generating the metadata filters from the user query but we need some way to append other filters to the query, and I cannot find how to do that in the documen...
https://stackoverflow.com/questions/79485287/how-to-pass-additional-query-filters-to-a-selfqueryretriever
python, nlp, artificial-intelligence, langchain
1,741,140,219
se_76983305
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fine-tuning TheBloke/Llama-2-13B-chat-GPTQ model with Hugging Face Transformers library throws Exllama error
Fine-tuning TheBloke/Llama-2-13B-chat-GPTQ model with Hugging Face Transformers library throws Exllama error I am trying to fine-tune the TheBloke/Llama-2-13B-chat-GPTQ model using the Hugging Face Transformers library. I am using a JSON file for the training and validation datasets. However, I am encountering an erro...
https://stackoverflow.com/questions/76983305/fine-tuning-thebloke-llama-2-13b-chat-gptq-model-with-hugging-face-transformers
nlp, huggingface-transformers, huggingface, llama, fine-tuning
1,693,058,250
se_79482290
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to handle German language specific characters like (&#228;, &#246;, &#252;, &#223;) while tokenizing using GPT2Tokenizer?
How to handle German language specific characters like (&#228;, &#246;, &#252;, &#223;) while tokenizing using GPT2Tokenizer? I am working with German Texts, where I need to tokenize texts using GPT2Tokenizer. To tokenize the text, I wrote the implementation as follows: from transformers import GPT2Tokenizer text = "...
https://stackoverflow.com/questions/79482290/how-to-handle-german-language-specific-characters-like-%c3%a4-%c3%b6-%c3%bc-%c3%9f-while-tokeni
python, nlp, tokenize, large-language-model, gpt-2
1,741,041,156
se_76190801
stackoverflow
ARTIFICIAL_INTELLIGENCE
BertScore giving me high results for unrelated sentences
BertScore giving me high results for unrelated sentences I've been trying out bert_score to do some metrics. When testing it, I'm finding that it's giving me some very high scores for some totally unrelated sentences. For example, I tried this: refs = ["Ladies in a kitchen laughing at the camera while one grates chees...
https://stackoverflow.com/questions/76190801/bertscore-giving-me-high-results-for-unrelated-sentences
python, nlp, bert-language-model
1,683,402,320
se_79449476
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do I remove escape characters from output of nltk.word_tokenize?
How do I remove escape characters from output of nltk.word_tokenize? How do I get rid of non-printing (escaped) characters from the output of the nltk.word_tokenize method? I am working through the book 'Natural Language Processing with Python' and am following the code examples, which inform me that the output should...
https://stackoverflow.com/questions/79449476/how-do-i-remove-escape-characters-from-output-of-nltk-word-tokenize
python, nlp, nltk, tokenize, text-processing
1,739,909,413
se_70716702
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using sentence transformers with limited access to internet
Using sentence transformers with limited access to internet I have access to the latest packages but I cannot access internet from my python enviroment. Package versions that I have are as below huggingface-hub-0.4.0 sacremoses-0.0.47 tokenizers-0.10.3 transformers-4.15.0 sentence-transformers-2.1.0 sentencepiece-0.1....
https://stackoverflow.com/questions/70716702/using-sentence-transformers-with-limited-access-to-internet
python, nlp, huggingface-transformers, sentence-transformers
1,642,195,601
se_79192130
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using an AWS service to execute a python script that will extract keywords from text using keyBERT?
Using an AWS service to execute a python script that will extract keywords from text using keyBERT? I have a simple python script that is given two blocks of text, it then extracts the keywords from them using keyBERT, and then compares the lists of keywords to sort them into two lists depending on if the lists share ...
https://stackoverflow.com/questions/79192130/using-an-aws-service-to-execute-a-python-script-that-will-extract-keywords-from
python, amazon-web-services, aws-lambda, nlp, large-language-model
1,731,669,216
se_79459888
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenNLP POSTaggerME and ChunkerME synergy
OpenNLP POSTaggerME and ChunkerME synergy I'm trying to use the OpenNLP chunking API to chunk a portuguese sentence. So, first I tokenized a sentence using TokenizerME, then I tagged it with POSTaggerME. For both I used the ready-made models provided by the project here. For the sentence โ€œIvo viu a uvaโ€, POSTaggerME r...
https://stackoverflow.com/questions/79459888/opennlp-postaggerme-and-chunkerme-synergy
nlp, opennlp
1,740,240,371
se_79465047
stackoverflow
ARTIFICIAL_INTELLIGENCE
Where is the HuggingFace model saved in when loading a model on colab?
Where is the HuggingFace model saved in when loading a model on colab? I have this code for loading a generative model. I'm not sure how to see model files in colab (i.e., config.json etc.). model_id = "deepseek-ai/DeepSeek-R1-Distill-Llama-8B" pipeline = transformers.pipeline( "text-generation", ...
https://stackoverflow.com/questions/79465047/where-is-the-huggingface-model-saved-in-when-loading-a-model-on-colab
nlp, huggingface-transformers, huggingface
1,740,439,542
se_5107371
stackoverflow
ARTIFICIAL_INTELLIGENCE
Document Analysis and Tagging
Document Analysis and Tagging Let's say I have a bunch of essays (thousands) that I want to tag, categorize, etc. Ideally, I'd like to train something by manually categorizing/tagging a few hundred, and then let the thing loose. What resources (books, blogs, languages) would you recommend for undertaking such a task?...
https://stackoverflow.com/questions/5107371/document-analysis-and-tagging
machine-learning, nlp, classification, bayesian, tagging
1,298,564,443
se_33180665
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use Chunker Class in OpenNLP?
How to use Chunker Class in OpenNLP? The ChunkerME class in OpenNLP has a chunk() method which takes two String[]. The first one should be the tags (tags from part of speech tagging process) and the second one is the actual terms. I'm having a tagged string in the format of Sir_NNP Arthur_NNP Conan_NNP... and I'd lik...
https://stackoverflow.com/questions/33180665/how-to-use-chunker-class-in-opennlp
nlp, opennlp, part-of-speech
1,445,035,790
se_52955249
stackoverflow
ARTIFICIAL_INTELLIGENCE
NoneType&#39; object is not iterable for Vectorizer sklearn
NoneType&#39; object is not iterable for Vectorizer sklearn I have imported text data into pandas dataframe. I would like to implement Vectorizer. So i use sklearn to do tfidf and so on So the first step i did. clean the text. #Creating Function from nltk.corpus import stopwords def text_process(sms): nonpunc =...
https://stackoverflow.com/questions/52955249/nonetype-object-is-not-iterable-for-vectorizer-sklearn
python, scikit-learn, nlp
1,540,317,931
se_78943401
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fine-tuning a Pretrained Model with Quantization and AMP: Scaler Error &quot;Attempting to Unscale FP16 Gradients&quot;
Fine-tuning a Pretrained Model with Quantization and AMP: Scaler Error &quot;Attempting to Unscale FP16 Gradients&quot; I am trying to fine-tune a pretrained model with limited VRAM. To achieve this, I am using quantization and automatic mixed precision (AMP). However, I am encountering an issue that I can't seem to r...
https://stackoverflow.com/questions/78943401/fine-tuning-a-pretrained-model-with-quantization-and-amp-scaler-error-attempti
python, pytorch, nlp, huggingface-transformers, fine-tuning
1,725,352,703
se_76852637
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to transcribe multiple audio files at once using Whisper finetuned model?
How to transcribe multiple audio files at once using Whisper finetuned model? TL;DR: I'm trying to transcribe multiple files together using Hugging face fine-tuned whisper ai model and extract the output as a single text file I have this code which works and transcribes an audio and shows its output as a string of tex...
https://stackoverflow.com/questions/76852637/how-to-transcribe-multiple-audio-files-at-once-using-whisper-finetuned-model
nlp, scripting, artificial-intelligence, google-colaboratory, openai-whisper
1,691,418,032
se_79448878
stackoverflow
ARTIFICIAL_INTELLIGENCE
Python Farm-haystack Dependencies
Python Farm-haystack Dependencies i am trying to implement a model using farm-haystack, however am having a dependency mismatch for the following libraries : transformers farm-haystack langchain pydantic fastapi uvicorn elasticsearch python-multipart, currently i have 2 versions of python installed on my machine (3.12...
https://stackoverflow.com/questions/79448878/python-farm-haystack-dependencies
python-3.x, nlp, artificial-intelligence, fastapi, haystack
1,739,894,755
se_77613507
stackoverflow
ARTIFICIAL_INTELLIGENCE
Training llm for Query Generation in a Graph Database
Training llm for Query Generation in a Graph Database If I have developed a graph database which has its own query language. I have to find a way to feed llm the graph and then llm should be able to generate the queries of our database. I have found something similar in langchain that we can feed it the rdf file and t...
https://stackoverflow.com/questions/77613507/training-llm-for-query-generation-in-a-graph-database
machine-learning, nlp, sparql, langchain, large-language-model
1,701,869,646
se_71252846
stackoverflow
ARTIFICIAL_INTELLIGENCE
is there a method to detect person and associate a text?
is there a method to detect person and associate a text? I have a text like : Take a loot at some of the first confirmed Forum speakers: John Sequiera Graduated in Biology at Facultad de Ciencias Exactas y Naturales,University of Buenos Aires, Argentina. In 2004 obtained a PhD in Biology (Molecular Neuroscience), a...
https://stackoverflow.com/questions/71252846/is-there-a-method-to-detect-person-and-associate-a-text
python-3.x, nlp, spacy
1,645,709,880
se_77945750
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to solve ERROR: Could not build wheels for sparse-dot-topn-for-blocks, which is required to install pyproject.toml-based projects?
How to solve ERROR: Could not build wheels for sparse-dot-topn-for-blocks, which is required to install pyproject.toml-based projects? I want to perform a string grouping operation on a dataset of ~7000 variants. After much research, I've found the string-grouper library to be matching my use case. This is an explaine...
https://stackoverflow.com/questions/77945750/how-to-solve-error-could-not-build-wheels-for-sparse-dot-topn-for-blocks-which
python, nlp
1,707,202,477
se_53015099
stackoverflow
ARTIFICIAL_INTELLIGENCE
Calculating Minimum Edit Distance for unequal strings python
Calculating Minimum Edit Distance for unequal strings python I am trying to implement Minimum Edit Distance with the substitution cost of 2. Following is the code I've so far. It works well for strings of equal length but generates error for the unequal strings. Kindly correct me where i am wrong def med(source, targ...
https://stackoverflow.com/questions/53015099/calculating-minimum-edit-distance-for-unequal-strings-python
python, nlp, edit-distance
1,540,581,683
se_39142778
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to determine the language of a piece of text?
How to determine the language of a piece of text? I want to get this: Input text: "ั€ัƒฬััะบะธะน ัะทั‹ฬะบ" Output text: "Russian" Input text: "ไธญๆ–‡" Output text: "Chinese" Input text: "ใซใปใ‚“ใ”" Output text: "Japanese" Input text: "ุงู„ุนูŽุฑูŽุจููŠูŽู‘ุฉ" Output text: "Arabic" How can I do it in python?
https://stackoverflow.com/questions/39142778/how-to-determine-the-language-of-a-piece-of-text
python, nlp
1,472,120,760
se_61742408
stackoverflow
ARTIFICIAL_INTELLIGENCE
Data Annotation for Machine Learning
Data Annotation for Machine Learning I am going to develop a machine learning model. I have large data sets(Text). I need overall better accuracy F1 score etc. I am using data annotation tools(Dataturks). Which approach will be good to label the data as single label per entity or multiple label per entity (like there ...
https://stackoverflow.com/questions/61742408/data-annotation-for-machine-learning
machine-learning, nlp, data-annotations, spacy, named-entity-recognition
1,589,248,043
se_25228219
stackoverflow
ARTIFICIAL_INTELLIGENCE
Clustering of news articles
Clustering of news articles My scenario is pretty straightforwrd: I have a bunch of news articles (~1k at the moment) for which I know that some cover the same story/topic. I now would like to group these articles based on shared story/topic, i.e., based on their similarity. What I did so far is to apply basic NLP te...
https://stackoverflow.com/questions/25228219/clustering-of-news-articles
machine-learning, nlp, cluster-analysis, information-retrieval, unsupervised-learning
1,407,670,745
se_79419884
stackoverflow
ARTIFICIAL_INTELLIGENCE
Underfitting Pre-Trained Glove + LSTM Model: Accurcacy Unchanged
Underfitting Pre-Trained Glove + LSTM Model: Accurcacy Unchanged I am doing a sentiment classification using Pre-Trained Glove and LSTM model. I use google play review and scrap it by myself, resulting in 50k++ texts. I implement random over sampling on the minority classes. However, when I train my LSTM model, the tr...
https://stackoverflow.com/questions/79419884/underfitting-pre-trained-glove-lstm-model-accurcacy-unchanged
keras, deep-learning, nlp, lstm, sentiment-analysis
1,738,896,505
se_79425052
stackoverflow
ARTIFICIAL_INTELLIGENCE
Generating an n-gram dataset based on an LLM
Generating an n-gram dataset based on an LLM I want a dataset of common n-grams and their log likelihoods. Normally I would download the Google Books Ngram Exports, but I wonder if I can generate a better dataset using a large language model. For example, this script uses llama_cpp.Llama.create_completion to find like...
https://stackoverflow.com/questions/79425052/generating-an-n-gram-dataset-based-on-an-llm
nlp, large-language-model, n-gram, llama-cpp-python, llamacpp
1,739,110,870
se_74636944
stackoverflow
ARTIFICIAL_INTELLIGENCE
Cannot Keep My Datetime Data and &#39;No&#39; Word in My Pandas DataFrame
Cannot Keep My Datetime Data and &#39;No&#39; Word in My Pandas DataFrame I have a pandas dataframe from csv and I want to clean it using Regex in Python. The data that I have look like this: Name Date Status Number A/bCDef 2022-07-11 Yes io123-07 GhIjK-l 2022-07-12 No io456-08 I'm trying to clean the da...
https://stackoverflow.com/questions/74636944/cannot-keep-my-datetime-data-and-no-word-in-my-pandas-dataframe
python, regex, datetime, nlp
1,669,868,988
se_78311147
stackoverflow
ARTIFICIAL_INTELLIGENCE
RuntimeError: Failed to import transformers.integrations.bitsandbytes
RuntimeError: Failed to import transformers.integrations.bitsandbytes I am trying to load an llm model in 4 bits precision. However, I got RuntimeError: Failed to import transformers.integrations.bitsandbytes because of the following error (look up to see its traceback): [WinError 193] %1 is not a valid Win32 applicat...
https://stackoverflow.com/questions/78311147/runtimeerror-failed-to-import-transformers-integrations-bitsandbytes
deep-learning, nlp, huggingface-transformers, large-language-model
1,712,846,265
se_77237818
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to load a huggingface pretrained transformer model directly to GPU?
How to load a huggingface pretrained transformer model directly to GPU? I want to load a huggingface pretrained transformer model directly to GPU (not enough CPU space) e.g. loading BERT from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("bert-base-uncased") would be loaded to ...
https://stackoverflow.com/questions/77237818/how-to-load-a-huggingface-pretrained-transformer-model-directly-to-gpu
python, nlp, huggingface-transformers
1,696,514,260
se_79411913
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to resolve ValueError while training Seq2Seq using DataCollatorForSeq2Seq
How to resolve ValueError while training Seq2Seq using DataCollatorForSeq2Seq I want to fine tune a VisionEncoderDecoderModel.from_pretrained(model_name) I use a CustomOCRDataset from Learn Open CV. But the default_data_collator fails to stack the inputs because the samples have a different shape , so I decided to use...
https://stackoverflow.com/questions/79411913/how-to-resolve-valueerror-while-training-seq2seq-using-datacollatorforseq2seq
nlp, huggingface-transformers, huggingface-tokenizers, seq2seq
1,738,676,684
se_62351295
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to gradually train a model on transformers library?
How to gradually train a model on transformers library? I have seen this tutorial on how to train a BERT model from scratch on Hugging Face Transformers library. I'm trying to train a GPT-2 model on 1.5 GB data on Google Colab. I load up all the data using this code: dataset = LineByLineTextDataset( tokenizer=t...
https://stackoverflow.com/questions/62351295/how-to-gradually-train-a-model-on-transformers-library
python, tensorflow, nlp, pytorch, huggingface-transformers
1,591,990,655
se_79408298
stackoverflow
ARTIFICIAL_INTELLIGENCE
PunktTokenizer does not work with Russian `ั.`
PunktTokenizer does not work with Russian `ั.` When tokenizing paragraphs to sentences in the Russian language, I am observing the special case when the sequence is not treated as the end of the sentence. The case is with the ั. at the end of the sentence. See the working example: import nltk tok = nltk.tokenize.Punk...
https://stackoverflow.com/questions/79408298/punkttokenizer-does-not-work-with-russian-%d1%8f
nlp, nltk, tokenize
1,738,573,939
se_79406743
stackoverflow
ARTIFICIAL_INTELLIGENCE
QuickUMLS Always Returns &quot;UNK&quot; for Any Input Text
QuickUMLS Always Returns &quot;UNK&quot; for Any Input Text I am using QuickUMLS to extract UMLS Concept Unique Identifiers (CUIs) from text, but no matter what word I input, it always returns "UNK". Here is my code: from quickumls import QuickUMLS quickumls_fp = "med7_en/lib/python3.10/site-packages/quickumls" match...
https://stackoverflow.com/questions/79406743/quickumls-always-returns-unk-for-any-input-text
python, machine-learning, deep-learning, nlp
1,738,505,575
se_79402035
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I add citations in the response on Vectara? While testing the Multiple Corpora Query
How can I add citations in the response on Vectara? While testing the Multiple Corpora Query How can I add citations in the response on Vectara? While testing the Multiple Corpora Query, I updated the citation in the payload. I followed the approach mentioned in the Vectara documentation. I have tried all the models m...
https://stackoverflow.com/questions/79402035/how-can-i-add-citations-in-the-response-on-vectara-while-testing-the-multiple-c
nlp, large-language-model, rag
1,738,308,395
se_76402289
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fuzzy Wuzzy: Obtain accurate scores
Fuzzy Wuzzy: Obtain accurate scores I have a case where users posts multiple messages daily to our work channel. These messages are an issue that can be related to multiple applications that we support (Okta, Slack, Cloudflare etc...). We have multiple solution documented that can help these users, and I want our bot ...
https://stackoverflow.com/questions/76402289/fuzzy-wuzzy-obtain-accurate-scores
python, python-3.x, nlp, string-matching, fuzzy-search
1,685,910,532
se_73032656
stackoverflow
ARTIFICIAL_INTELLIGENCE
Pyspark error - Invalid argument, not a string or column while implementing inside pandas_udf
Pyspark error - Invalid argument, not a string or column while implementing inside pandas_udf This code is working fine outside the pandas_udf but getting this error while trying to implement the same inside udf. To avoid conflicts between pyspark and python function names, I have explicitly imported specific function...
https://stackoverflow.com/questions/73032656/pyspark-error-invalid-argument-not-a-string-or-column-while-implementing-insi
python, machine-learning, pyspark, nlp, pandas-udf
1,658,215,113
se_12206276
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to check if given word is in plural or singular form?
How to check if given word is in plural or singular form? Question like in topic - I'm trying to do that in python for app in Google App Engine. I know PyEnchant library is used for natural language recognition but I don't see if I can use it for my problem and how.
https://stackoverflow.com/questions/12206276/how-to-check-if-given-word-is-in-plural-or-singular-form
python, nlp
1,346,364,557
se_24007912
stackoverflow
ARTIFICIAL_INTELLIGENCE
How To Detect Is Text Human Readable?
How To Detect Is Text Human Readable? I am wondering if there's a way to tell a given text is human readable. By human readable, I mean: it has some meanings, format like an article written by somebody, or at least generated by a software translator that is intended to be read by a human. Here's the background story:...
https://stackoverflow.com/questions/24007912/how-to-detect-is-text-human-readable
android, ios, nlp
1,401,774,257
se_71581197
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is the loss function used in Trainer from the Transformers library of Hugging Face?
What is the loss function used in Trainer from the Transformers library of Hugging Face? What is the loss function used in Trainer from the Transformers library of Hugging Face? I am trying to fine tune a BERT model using the Trainer class from the Transformers library of Hugging Face. In their documentation, they men...
https://stackoverflow.com/questions/71581197/what-is-the-loss-function-used-in-trainer-from-the-transformers-library-of-huggi
python, machine-learning, nlp, artificial-intelligence, huggingface-transformers
1,648,002,951
se_79393930
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is my BERT model producing NaN loss during training for multi-label classification on imbalanced data?
Why is my BERT model producing NaN loss during training for multi-label classification on imbalanced data? Iโ€™m running into a frustrating issue while training a BERT-based multi-label text classification model on an imbalanced dataset. After a few epochs, the training loss suddenly becomes NaN, and I canโ€™t seem to fig...
https://stackoverflow.com/questions/79393930/why-is-my-bert-model-producing-nan-loss-during-training-for-multi-label-classifi
deep-learning, nlp, bert-language-model, multilabel-classification, imbalanced-data
1,738,069,395
se_77074676
stackoverflow
ARTIFICIAL_INTELLIGENCE
ImportError: cannot import name &#39;deprecated&#39; from &#39;typing_extensions&#39;
ImportError: cannot import name &#39;deprecated&#39; from &#39;typing_extensions&#39; I want to download spacy, but the version of typing-extensions is lowered in the terminal: ERROR: pydantic 2.3.0 has requirement typing-extensions>=4.6.1, but you'll have typing-extensions 4.4.0 which is incompatible. ERROR: pydantic...
https://stackoverflow.com/questions/77074676/importerror-cannot-import-name-deprecated-from-typing-extensions
python, pip, nlp, spacy, python-typing
1,694,314,709
se_67427823
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is the difference between Transformer encoder vs Transformer decoder vs Transformer encoder-decoder?
What is the difference between Transformer encoder vs Transformer decoder vs Transformer encoder-decoder? I know that GPT uses Transformer decoder, BERT uses Transformer encoder, and T5 uses Transformer encoder-decoder. But can someone help me understand why GPT only uses the decoder, BERT only uses encoder, and T5 us...
https://stackoverflow.com/questions/67427823/what-is-the-difference-between-transformer-encoder-vs-transformer-decoder-vs-tra
nlp, bert-language-model, generative-pretrained-transformer
1,620,350,481
se_79390234
stackoverflow
ARTIFICIAL_INTELLIGENCE
Cuda out of memory while training
Cuda out of memory while training I'm trying to finetune a base model with my own data using prompts, however I keep getting this error: OutOfMemoryError: CUDA out of memory. Tried to allocate 224.00 MiB. GPU 0 has a total capacity of 79.25 GiB of which 177.50 MiB is free. Process 230359 has 79.07 GiB memory in use. ...
https://stackoverflow.com/questions/79390234/cuda-out-of-memory-while-training
nlp, tokenize, large-language-model, fine-tuning
1,737,969,820
se_75794919
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to segment and transcribe an audio from a video into timestamped segments?
How to segment and transcribe an audio from a video into timestamped segments? I want to segment a video transcript into chapters based on the content of each line of speech. The transcript would be used to generate a series of start and end timestamps for each chapter. This is similar to how YouTube now "auto-chapter...
https://stackoverflow.com/questions/75794919/how-to-segment-and-transcribe-an-audio-from-a-video-into-timestamped-segments
python, machine-learning, nlp, openai-api, automatic-speech-recognition
1,679,343,286
se_79386385
stackoverflow
ARTIFICIAL_INTELLIGENCE
I am getting error while running this line of code gnb.fit(df_train, y_train)
I am getting error while running this line of code gnb.fit(df_train, y_train) Title: ValueError: could not convert string to float when training GaussianNB for SMS Spam Detection Body: I'm building an SMS spam detection tool and encountering an error while predicting with a GaussianNB model. Here's the error message: ...
https://stackoverflow.com/questions/79386385/i-am-getting-error-while-running-this-line-of-code-gnb-fitdf-train-y-train
python, nlp, nltk, gaussian
1,737,792,596
se_79385917
stackoverflow
ARTIFICIAL_INTELLIGENCE
torch.OutOfMemoryError: CUDA out of memory. (Google Colab)
torch.OutOfMemoryError: CUDA out of memory. (Google Colab) I tried to adapt the mBERT model to an existing code. However, I received the following issue even though I tried different solutions. torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacity of 14.75 GiB of which 9.0...
https://stackoverflow.com/questions/79385917/torch-outofmemoryerror-cuda-out-of-memory-google-colab
python, nlp, google-colaboratory, bert-language-model
1,737,762,079
se_54510289
stackoverflow
ARTIFICIAL_INTELLIGENCE
Transformer - Attention is all you need - encoder decoder cross attention
Transformer - Attention is all you need - encoder decoder cross attention It is my understanding that each encoder block takes the output from the previous encoder, and that the output is the attended representation (Z) of the sequence (aka sentence). My question is, how does the last encoder block produce K, V from ...
https://stackoverflow.com/questions/54510289/transformer-attention-is-all-you-need-encoder-decoder-cross-attention
deep-learning, nlp, attention-model
1,549,255,842
se_79372521
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: isinstance() arg 2 must be a type or tuple of types with collections search in Weaviate
TypeError: isinstance() arg 2 must be a type or tuple of types with collections search in Weaviate I have the following code: from weaviate.classes.query import MetadataQuery import weaviate from langchain_huggingface import HuggingFaceEmbeddings embedding_model = HuggingFaceEmbeddings(model_name = 'sentence-transfor...
https://stackoverflow.com/questions/79372521/typeerror-isinstance-arg-2-must-be-a-type-or-tuple-of-types-with-collections
python-3.x, nlp, vector-database, rag, weaviate
1,737,403,244
se_57213165
stackoverflow
ARTIFICIAL_INTELLIGENCE
Loading pickle NotFittedError: TfidfVectorizer - Vocabulary wasn&#39;t fitted
Loading pickle NotFittedError: TfidfVectorizer - Vocabulary wasn&#39;t fitted multilabel classification I am trying to predict a multilabel classification using scikit-learn/pandas/OneVsRestClassifier/logistic regression. Building and evaluating the model works but attempting to classify new sample text does not. scen...
https://stackoverflow.com/questions/57213165/loading-pickle-notfittederror-tfidfvectorizer-vocabulary-wasnt-fitted
python-3.x, machine-learning, nlp, pickle, tfidfvectorizer
1,564,114,865
se_79367089
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is it possible to Fine-Tune TinyBERT on Mac (M1 chip)?
Is it possible to Fine-Tune TinyBERT on Mac (M1 chip)? Does fine-tuning require huge resources, or is it possible to do this task on the local machine as well? I have an Apple M1 (8GB RAM). I know bigger models GPU access but what about TinyBERT? My training dataset has 100,000 samples for your reference.
https://stackoverflow.com/questions/79367089/is-it-possible-to-fine-tune-tinybert-on-mac-m1-chip
deep-learning, nlp, huggingface-transformers, text-classification, fine-tuning
1,737,201,482
se_66193575
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is the vocab size of Byte level BPE smaller than Unicode&#39;s vocab size?
Why is the vocab size of Byte level BPE smaller than Unicode&#39;s vocab size? I recently read GPT2 and the paper says: This would result in a base vocabulary of over 130,000 before any multi-symbol tokens are added. This is prohibitively large compared to the 32,000 to 64,000 token vocabularies often used with BPE....
https://stackoverflow.com/questions/66193575/why-is-the-vocab-size-of-byte-level-bpe-smaller-than-unicodes-vocab-size
unicode, utf-8, nlp
1,613,290,654
se_70572939
stackoverflow
ARTIFICIAL_INTELLIGENCE
Removing various symbols from a text
Removing various symbols from a text I am trying to clean some texts that are very different from one another. I would like to remove the headlines, quotation marks, abbreviations, special symbols and points that don't actually end sentences. Example input: This is a headline And inside the text there are 'abbreviati...
https://stackoverflow.com/questions/70572939/removing-various-symbols-from-a-text
python, string, text, replace, nlp
1,641,256,901
se_79362647
stackoverflow
ARTIFICIAL_INTELLIGENCE
SHAP for transformer-based Regression
SHAP for transformer-based Regression I'm developing a transformer-based regression model using a classification model with num labels set to 1 so that it can be used for regression. from transformers import AutoTokenizer, AutoModelForSequenceClassification, DataCollatorWithPadding from torch.utils.data import DataLoa...
https://stackoverflow.com/questions/79362647/shap-for-transformer-based-regression
nlp, regression, huggingface-transformers, text-classification, shap
1,737,050,549
se_69596496
stackoverflow
ARTIFICIAL_INTELLIGENCE
(with cpu)Pytorch: IndexError: index out of range in self. (with cuda)Assertion `srcIndex &lt; srcSelectDimSize` failed. How to solve?
(with cpu)Pytorch: IndexError: index out of range in self. (with cuda)Assertion `srcIndex &lt; srcSelectDimSize` failed. How to solve? Today I get the following error when I use BERT with Pytorch and cuda: /pytorch/aten/src/ATen/native/cuda/Indexing.cu:702: indexSelectLargeIndex: block: [234,0,0], thread: [0,0,0] Asse...
https://stackoverflow.com/questions/69596496/with-cpupytorch-indexerror-index-out-of-range-in-self-with-cudaassertion
python, machine-learning, nlp, pytorch, bert-language-model
1,634,394,516
se_69150110
stackoverflow
ARTIFICIAL_INTELLIGENCE
Problem in tqdm function in a Doc2Vec model
Problem in tqdm function in a Doc2Vec model I am using this article https://actsusanli.medium.com/ to implement the Doc2Vec model and I have a problem in the training step. model_dbow.train(utils.shuffle([x for x in tqdm(train_tagged.values)]), total_examples=len(train_tagged.values), epochs = 40) As you can see, I a...
https://stackoverflow.com/questions/69150110/problem-in-tqdm-function-in-a-doc2vec-model
python, nlp, doc2vec, tqdm
1,631,438,783
se_9538425
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a database, API, or parsable text for getting verb conjugations?
Is there a database, API, or parsable text for getting verb conjugations? This isn't directly a programming question, so I apologize in advance. I've been working on a grammar-free random sentence generator for a typing game I'd like to make, and I've been having a difficult time finding any parsable (or callable) dat...
https://stackoverflow.com/questions/9538425/is-there-a-database-api-or-parsable-text-for-getting-verb-conjugations
nlp
1,330,712,660
se_15574915
stackoverflow
ARTIFICIAL_INTELLIGENCE
Stanford Core NLP how to get the probability &amp; margin of error
Stanford Core NLP how to get the probability &amp; margin of error When using the parser or for the matter any of the Annotation in Core NLP, is there a way to access the probability or the margin of error? I am particularly interested in detecting ambiguity programmatically. For example, in the sentence below, desire...
https://stackoverflow.com/questions/15574915/stanford-core-nlp-how-to-get-the-probability-margin-of-error
nlp, stanford-nlp, pos-tagger
1,363,968,557
se_79347073
stackoverflow
ARTIFICIAL_INTELLIGENCE
WebSocket Error 403 During Handshake with ElevenLabs API
WebSocket Error 403 During Handshake with ElevenLabs API Iโ€™m working on a conversational AI website, and Iโ€™m using the ElevenLabs API for voice generation and conversation handling. However, Iโ€™ve run into a problem when trying to establish a WebSocket connection to their API. Here are the details of the issue: Termina...
https://stackoverflow.com/questions/79347073/websocket-error-403-during-handshake-with-elevenlabs-api
next.js, nlp, artificial-intelligence, conversational-ai, elevenlabs
1,736,544,300
se_59008046
stackoverflow
ARTIFICIAL_INTELLIGENCE
Extracting English imperative mood from verb tags with spaCy
Extracting English imperative mood from verb tags with spaCy I would like to detect the imperative mood of verbs in English sentences. From this question I'm aware that spaCy has access to extended morphological features, but I don't see them when I use it, using spaCy version 2.1.8, Python 3.7.1: >>> import spacy >>...
https://stackoverflow.com/questions/59008046/extracting-english-imperative-mood-from-verb-tags-with-spacy
python-3.x, nlp, spacy
1,574,514,957
se_71083239
stackoverflow
ARTIFICIAL_INTELLIGENCE
Unable to install sentence-transformers, getting error
Unable to install sentence-transformers, getting error Running below command after installing python 3.10. pip3 install -U sentence-transformers List item ERROR: Cannot install sentence-transformers==0.1.0, sentence-transformers==0.2.0, sentence-transformers==0.2.1, sentence-transformers==0.2.2, sentence-transformer...
https://stackoverflow.com/questions/71083239/unable-to-install-sentence-transformers-getting-error
python, nlp
1,644,596,039
se_79256112
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to log only the current script file to W&amp;B code panel immediately?
How to log only the current script file to W&amp;B code panel immediately? How can I ensure that only the current script file (e.g., train.py) is logged to the W&B Code panel when running a script, without logging the entire directory? Currently, I'm using: wandb.run.log_code(f"./{os.path.basename(__file__)}") I want...
https://stackoverflow.com/questions/79256112/how-to-log-only-the-current-script-file-to-wb-code-panel-immediately
deep-learning, nlp, wandb
1,733,429,481
se_79347444
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can one get the LLM model name and version using Google AI Edge SDK?
How can one get the LLM model name and version using Google AI Edge SDK? I use Google AI Edge SDK to call an on-device LLM (example app). How can I get the LLM model name and version that my code uses? https://developer.android.com/ai/gemini-nano says it uses Gemini Nano: but there are at least 2 versions of Gemini N...
https://stackoverflow.com/questions/79347444/how-can-one-get-the-llm-model-name-and-version-using-google-ai-edge-sdk
android, nlp, large-language-model
1,736,563,378
se_79345691
stackoverflow
ARTIFICIAL_INTELLIGENCE
Issues with nltk&#39;s ne_chunk
Issues with nltk&#39;s ne_chunk I have been trying to use nltk's entity chunker, and tried different approaches but I keep getting the error: LookupError Traceback (most recent call last) ... 8 pos_sentences = [nltk.pos_tag(sent) for sent in token_sentences] 10 # Create ...
https://stackoverflow.com/questions/79345691/issues-with-nltks-ne-chunk
python, nlp, nltk, pos-tagger, ent
1,736,511,554
se_79344668
stackoverflow
ARTIFICIAL_INTELLIGENCE
word reduction of a list of words
word reduction of a list of words Besides using a chatbot like o1 mini, is there more local way to reduce a list of words from 10 words down to 3 words? I feel that due to context, word association, semantic meanings of the words, a there has to be some form of extrapolation to reduce the list but so far my attempts h...
https://stackoverflow.com/questions/79344668/word-reduction-of-a-list-of-words
python, nlp
1,736,485,950
se_10383044
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fuzzy String Comparison
Fuzzy String Comparison What I am striving to complete is a program which reads in a file and will compare each sentence according to the original sentence. The sentence which is a perfect match to the original will receive a score of 1 and a sentence which is the total opposite will receive a 0. All other fuzzy sente...
https://stackoverflow.com/questions/10383044/fuzzy-string-comparison
python, nlp, fuzzy-comparison
1,335,785,840
se_58636587
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I use BERT for long text classification?
How can I use BERT for long text classification? We know that BERT has a maximum length limit of tokens = 512. So if an article has a length of much bigger than 512, such as 10000 tokens in text, how can BERT be used?
https://stackoverflow.com/questions/58636587/how-can-i-use-bert-for-long-text-classification
nlp, text-classification, bert-language-model
1,572,492,851
se_79162350
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there any flag to stop langgraph for further executing?
Is there any flag to stop langgraph for further executing? I want to create a interviewing bot that may ask 5 questions. The questions are specified in the system prompt. I just want the langgraph to stop execution when 5 certain questions are asked. I tried quick start of the langgraph official docs. I read the docum...
https://stackoverflow.com/questions/79162350/is-there-any-flag-to-stop-langgraph-for-further-executing
python, nlp, chatbot, large-language-model, langgraph
1,730,891,670
se_79330283
stackoverflow
ARTIFICIAL_INTELLIGENCE
Can&#39;t compile Marian NMT
Can&#39;t compile Marian NMT I'm using endeavouros. I'm trying to compile Marian with these instructions: https://marian-nmt.github.io/docs/#installation. But it fails. The error message seemingly indicates a conflict between the code and c++20. But in all the CMakeLists.txt files of the repo, there is the line set (C...
https://stackoverflow.com/questions/79330283/cant-compile-marian-nmt
gcc, cmake, nlp, g++
1,736,057,099
se_29151329
stackoverflow
ARTIFICIAL_INTELLIGENCE
Arabic lemmatization and Stanford NLP
Arabic lemmatization and Stanford NLP I try to make lemmatization, ie identifying the lemma and possibly the Arabic root of a verb, for example: ูŠุชุตู„ ==> lemma (infinitive of the verb) ==> ุงุชุตู„ ==> root (triliteral root / Jidr thoulathi) ==> ูˆ ุต ู„ Do you think Stanford NLP can do that? Best Regards,
https://stackoverflow.com/questions/29151329/arabic-lemmatization-and-stanford-nlp
nlp, stanford-nlp, lexical-analysis, stemming, lemmatization
1,426,786,434
se_76914119
stackoverflow
ARTIFICIAL_INTELLIGENCE
Validation and Training Loss when using HuggingFace
Validation and Training Loss when using HuggingFace I do not seem to find an explanation on how the validation and training losses are calculated when we finetune a model using the huggingFace trainer. Does anyone know here to find this information?
https://stackoverflow.com/questions/76914119/validation-and-training-loss-when-using-huggingface
nlp, huggingface-transformers, huggingface, huggingface-trainer
1,692,192,967
se_79328514
stackoverflow
ARTIFICIAL_INTELLIGENCE
how to get custom column in the model&#39;s forward() function when training with Huggingface Trainer?
how to get custom column in the model&#39;s forward() function when training with Huggingface Trainer? I am using Huggingface Trainer to train a cumstom model subclassing a Llama llm. After tokenized by the tokenizer, my dataset has these fields 'input_ids', 'labels' and so on, and I additionally add 2 custom colunms ...
https://stackoverflow.com/questions/79328514/how-to-get-custom-column-in-the-models-forward-function-when-training-with-hu
pytorch, nlp, large-language-model, huggingface-trainer
1,735,981,064
se_27943396
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using WN-Affect to detect emotion/mood of a string
Using WN-Affect to detect emotion/mood of a string I downloaded WN-Affect. I am however not sure how to use it to detect the mood of a sentence. For example if I have a string "I hate football." I want to be able to detect whether the mood is bad and the emotion is fear. WN-Affect has no tutorial on how to do it, and...
https://stackoverflow.com/questions/27943396/using-wn-affect-to-detect-emotion-mood-of-a-string
python, nlp, nltk, sentiment-analysis, wordnet
1,421,239,891
se_2644345
stackoverflow
ARTIFICIAL_INTELLIGENCE
Which is better? OpenCyc or ConceptNet?
Which is better? OpenCyc or ConceptNet? I'm doing a NLP project where I need to recognise concepts in sentences to find other similar concepts. I do this to infer word valences from a list I already have. I started using WordNet, but it gave many contradictory results. By contradictory results I mean word expansions t...
https://stackoverflow.com/questions/2644345/which-is-better-opencyc-or-conceptnet
nlp, wordnet, conceptnet
1,271,326,204
se_78744043
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do I install language model for spacy on Kaggle?
How do I install language model for spacy on Kaggle? Aloha! Everybody knows how to install model at home: python -m spacy download ru_core_news_md But since python notebook on Kaggle is isolated of the global web, it does not seem possible to do so. Of course, I can download ru_core_news_sm-3.7.0-py3-none-any.whl fi...
https://stackoverflow.com/questions/78744043/how-do-i-install-language-model-for-spacy-on-kaggle
python, nlp, spacy, kaggle
1,720,879,213