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_78249442 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error Accessing completions Property of openai in Node.js Module | Error Accessing completions Property of openai in Node.js Module
I'm working on a Node.js project where I'm trying to integrate OpenAI's API to process some files and use the chat completion feature. My module handles file uploads, processes these files, and is supposed to interact with OpenAI's API for further proces... | https://stackoverflow.com/questions/78249442/error-accessing-completions-property-of-openai-in-node-js-module | node.js, openai-api | 1,711,831,115 |
se_76624914 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I change the default 4 documents that LangChain returns? | How do I change the default 4 documents that LangChain returns?
I have the following code that implements LangChain + ChatGPT to answer questions from given data:
import { PineconeStore } from 'langchain/vectorstores/pinecone';
import { ConversationalRetrievalQAChain } from 'langchain/chains';
const CONDENSE_PROMPT =... | https://stackoverflow.com/questions/76624914/how-do-i-change-the-default-4-documents-that-langchain-returns | openai-api, langchain, gpt-4 | 1,688,605,911 |
se_77992397 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there any possible way to bind End-User-Id using langchain_openai? | Is there any possible way to bind End-User-Id using langchain_openai?
I've found a OpenAI documentation to add End-user-Ids in this documentation(https://platform.openai.com/docs/guides/safety-best-practices).
I would like to know how to bind the user id using langchain_openai package.
from langchain_openai import Cha... | https://stackoverflow.com/questions/77992397/is-there-any-possible-way-to-bind-end-user-id-using-langchain-openai | openai-api, langchain | 1,707,891,655 |
se_73669440 | stackoverflow | ARTIFICIAL_INTELLIGENCE | http POST request works in VSCode testing, but doesn't work with node-fetch in lambda function | http POST request works in VSCode testing, but doesn't work with node-fetch in lambda function
I have a lambda function that moderates input before calling the OpenAI API. It works perfectly in sam local, as well as directly in Visual Studio Code (not through my lambda URL). When I use my lambda function, I get th... | https://stackoverflow.com/questions/73669440/http-post-request-works-in-vscode-testing-but-doesnt-work-with-node-fetch-in-l | node.js, aws-lambda, openai-api, node-fetch | 1,662,786,653 |
se_77280761 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "Module 'openai' has no attribute 'ChatCompletion', did you mean 'Completion'?" | OpenAI API error: "Module 'openai' has no attribute 'ChatCompletion', did you mean 'Completion'?"
I can't seem to figure out what the issue is here, I am running version 0.28.1:
from what I have read I should be using ChatCompletion rather than Completion as that's what gpt-4 and 3.5... | https://stackoverflow.com/questions/77280761/openai-api-error-module-openai-has-no-attribute-chatcompletion-did-you-me | python, openai-api, chatgpt-api, chat-gpt-4 | 1,697,115,136 |
se_78260375 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AzureOpenAI returning openai.NotFoundError | AzureOpenAI returning openai.NotFoundError
I am trying to create embeddings as described here: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/ai-services/openai/how-to/embeddings.md
So this:
import os
from openai import AzureOpenAI
client = AzureOpenAI(
api_key = os.getenv("AZURE_OPENAI_API_KEY"), ... | https://stackoverflow.com/questions/78260375/azureopenai-returning-openai-notfounderror | python, azure, openai-api, azure-openai | 1,712,051,196 |
se_77838865 | stackoverflow | ARTIFICIAL_INTELLIGENCE | tls: failed to verify certificate: x509: certificate signed by unknown authority when I use text2vec-openai module in weaviate docker container | tls: failed to verify certificate: x509: certificate signed by unknown authority when I use text2vec-openai module in weaviate docker container
When I execute below code in operate_weaviate container(python:latest), text2vec-openai module(in weaviate) respond error message.
Please tell me the way to fix this error.
■C... | https://stackoverflow.com/questions/77838865/tls-failed-to-verify-certificate-x509-certificate-signed-by-unknown-authority | python, docker, ssl, openai-api, weaviate | 1,705,575,754 |
se_78259888 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to scale the number of concurrent users of my LLM Chatbot RAG system for production | How to scale the number of concurrent users of my LLM Chatbot RAG system for production
I have developed a chatbot using Azure OpenAI ChatGPT as LLM and AWS as the cloud provider for hosting the entire application, more details can be consulted in the image below.
Now, as the topology of my chatbot is a RAG (Retrieval... | https://stackoverflow.com/questions/78259888/how-to-scale-the-number-of-concurrent-users-of-my-llm-chatbot-rag-system-for-pro | amazon-web-services, azure, openai-api, azure-openai, retrieval-augmented-generation | 1,712,046,113 |
se_78240485 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to add context to chat-gpt twilio customer service bot? | How to add context to chat-gpt twilio customer service bot?
I want to implement langchain to this call-gpt repo so that I can get a twilio phone number to answer company specific questions. How would I go about this?
https://www.twilio.com/en-us/blog/call-gpt-twilio#Configure-your-environment (tutorial used to get twi... | https://stackoverflow.com/questions/78240485/how-to-add-context-to-chat-gpt-twilio-customer-service-bot | node.js, twilio, openai-api, langchain, twilio-programmable-chat | 1,711,654,346 |
se_77105733 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Ktor Server. How to add swagger-ui like spring doc-openapi-util? | Ktor Server. How to add swagger-ui like spring doc-openapi-util?
I development http API on Ktor and want to add swagger-ui and swagger generator. I used to use Spring and Spring Boot and I just added dependency for doc-openapi-util and and everything worked!
How to do this fo work Ktor?
I have tested ktor-server-opena... | https://stackoverflow.com/questions/77105733/ktor-server-how-to-add-swagger-ui-like-spring-doc-openapi-util | kotlin, swagger-ui, openai-api, ktor | 1,694,700,664 |
se_75747955 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Transcription via OpenAi's whisper: AssertionError: incorrect audio shape | Transcription via OpenAi's whisper: AssertionError: incorrect audio shape
I'm trying to use OpenAI's open source Whisper library to transcribe audio files.
Here is my script's source code:
import whisper
model = whisper.load_model("large-v2")
# load the entire audio file
audio = whisper.load_audio("/content/file... | https://stackoverflow.com/questions/75747955/transcription-via-openais-whisper-assertionerror-incorrect-audio-shape | python, python-3.x, ffmpeg, openai-api, openai-whisper | 1,678,900,055 |
se_78255804 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Text to SQL using Azure OpenAI | Text to SQL using Azure OpenAI
I am attempting to extract an SQL query from a simple text by using Azure OpenAI and Langchain. I am applying a filter condition that should generate an SQL query based on specific table details from a CSV file. The CSV file contains columns for table name, table description, and schema ... | https://stackoverflow.com/questions/78255804/text-to-sql-using-azure-openai | azure, openai-api, langchain, large-language-model, azure-openai | 1,711,978,754 |
se_78252745 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Protect OpenAI key using Firebase function | Protect OpenAI key using Firebase function
I have an app that uses OpenAI and like many others my key was recently compromised.
I have this simple code:
const functions = require('firebase-functions');
const OpenAI = require("openai");
const openai = new OpenAI({
apiKey: functions.config().openai.key,
});
export... | https://stackoverflow.com/questions/78252745/protect-openai-key-using-firebase-function | swift, firebase, google-cloud-functions, openai-api | 1,711,916,942 |
se_78252246 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python ChatGPT bot issue with openai.Completion | Python ChatGPT bot issue with openai.Completion
I'm trying to write a chatbot. I get the error, "You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0."
Could someone help me figure out how to rewrite this to work with v1.0.0 of openAI API?
import openai
# Replace 'your_api_key_here'... | https://stackoverflow.com/questions/78252246/python-chatgpt-bot-issue-with-openai-completion | python, openai-api | 1,711,906,389 |
se_78249089 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure openai load testing mode | Azure openai load testing mode
Diving deep into azure development and can't find any logical solution for load testing of AppService that is using OpenAI services.
I suppose there should be some "load testing mode" for Azure Open AI. Maybe separate testing model that will behave like a regular OpenAI model but will no... | https://stackoverflow.com/questions/78249089/azure-openai-load-testing-mode | azure, load-testing, openai-api, azure-openai, azure-load-testing | 1,711,824,080 |
se_76712229 | stackoverflow | ARTIFICIAL_INTELLIGENCE | cl100k_base (openAI) encoding does not compile with python program | cl100k_base (openAI) encoding does not compile with python program
I am running a program that uses the gpt 3.5 turbo 16k model, which uses the cl100k_base encoding. When I run this in an IDE, it works perfectly however when I compile the program, it can't identify cl100k_base encoding.Is there a way around this?
To c... | https://stackoverflow.com/questions/76712229/cl100k-base-openai-encoding-does-not-compile-with-python-program | encoding, openai-api, chatgpt-api | 1,689,679,038 |
se_77658143 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to incorporate the chat history in a CONVERSATIONAL_REACT_DESCRIPTION agent | How to incorporate the chat history in a CONVERSATIONAL_REACT_DESCRIPTION agent
I have a langchain agent that I am trying to incorporate chat history in. I have used the below code:-
agent_kwargs = {
'prefix': f'''Answer the questions to provide relevant information to a etc etc
Begin!
''',
"extra_prom... | https://stackoverflow.com/questions/77658143/how-to-incorporate-the-chat-history-in-a-conversational-react-description-agent | python, openai-api, langchain | 1,702,535,062 |
se_78244438 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does this error keep showing, what am i missing? await message.channel.send(f"Answer: {bot_response}") IndentationError: unexpected indent | Why does this error keep showing, what am i missing? await message.channel.send(f"Answer: {bot_response}") IndentationError: unexpected indent
So my code is basically copied from a walktrough for making a discord bot use chatgpt.
Im using Pycharm for the project.
This would be the main - code:
from typing im... | https://stackoverflow.com/questions/78244438/why-does-this-error-keep-showing-what-am-i-missing-await-message-channel-send | python, discord, artificial-intelligence, openai-api | 1,711,724,361 |
se_76664629 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Retrieving the page number from the document in question-answering task [LangChain] | Retrieving the page number from the document in question-answering task [LangChain]
I am building a question-answer app using LangChain. Following the numerous tutorials on web, I was not able to come across of extracting the page number of the relevant answer that is being generated given the fact that I have split t... | https://stackoverflow.com/questions/76664629/retrieving-the-page-number-from-the-document-in-question-answering-task-langcha | pdf, openai-api, langchain, nlp-question-answering, large-language-model | 1,689,098,277 |
se_76632345 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RetrievalQA ValueError: Missing some input keys: {'query'} | RetrievalQA ValueError: Missing some input keys: {'query'}
I tried to build a chatbot for job applicants by using the RetrievalQA chain and retrieve info from a csv file. The preference is a string, resume, and text under the try statement are all strings. I don't have any clue why I got the error ValueError: ... | https://stackoverflow.com/questions/76632345/retrievalqa-valueerror-missing-some-input-keys-query | python, prompt, openai-api, langchain | 1,688,675,357 |
se_77921898 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Not getting source documents from chain in langchain and openAI embeddings | Not getting source documents from chain in langchain and openAI embeddings
I'm loading pdfs using langchain.document_loaders:
loader = DirectoryLoader( './files/', glob='*.pdf', loader_cls=PyPDFLoader)
then splitted the docs, created the embeddings, stored and loaded them :
docsearch = Chroma.from_documents(texts, emb... | https://stackoverflow.com/questions/77921898/not-getting-source-documents-from-chain-in-langchain-and-openai-embeddings | python, openai-api, langchain, openaiembeddings | 1,706,805,323 |
se_76269666 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I ran into an error when I try to use YoutubeLoader.from_youtube_url | I ran into an error when I try to use YoutubeLoader.from_youtube_url
There is my code snippet
import os,openai
from langchain.document_loaders import YoutubeLoader
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
from langchain.text_splitter import RecursiveCharacterT... | https://stackoverflow.com/questions/76269666/i-ran-into-an-error-when-i-try-to-use-youtubeloader-from-youtube-url | python, youtube-api, openai-api, gpt-3, langchain | 1,684,309,548 |
se_78241038 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Beginner, I am stuck on setting up to use the GPT 3.5 model in Jupyter Notebook? | Beginner, I am stuck on setting up to use the GPT 3.5 model in Jupyter Notebook?
I am completely new, so apologies in advance.
I have Python 3.11.4 installed on my Mac.
According to the OpenAI Quickstart guide, I must install the OpenAI Python library by running 'pip install --upgrade openai' in my terminal. (Side not... | https://stackoverflow.com/questions/78241038/beginner-i-am-stuck-on-setting-up-to-use-the-gpt-3-5-model-in-jupyter-notebook | jupyter-notebook, terminal, openai-api, api-key, chatgpt-api | 1,711,662,679 |
se_58349396 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can I suggest top 5 classes for a new data using Multi-class Classification? | Can I suggest top 5 classes for a new data using Multi-class Classification?
I have a dataset of tickets the machine gets for some machine components failure. The ticket are in text form.
For each failure we have around 8-10 diagnosis labels. This tells what the issue might have been and being used to fix the ticket.
... | https://stackoverflow.com/questions/58349396/can-i-suggest-top-5-classes-for-a-new-data-using-multi-class-classification | machine-learning, nlp | 1,570,835,116 |
se_30996514 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I find the nearest word for a given vector using a bag-of-words approach? | How do I find the nearest word for a given vector using a bag-of-words approach?
I am trying to build a bag-of-words class which can create a vocabulary and find a nearest word for the given vector in the vocabulary.
For example I load a float vector or a matrix and want to find the nearest word.
Can someone explain t... | https://stackoverflow.com/questions/30996514/how-do-i-find-the-nearest-word-for-a-given-vector-using-a-bag-of-words-approach | c++, machine-learning, nlp, cluster-analysis | 1,435,044,716 |
se_79993518 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python NLP usage of .lower() function | Python NLP usage of .lower() function
Following the NLTK book in chapter 2 I noticed this:
fileid = 'whitman-leaves.txt'
fi = nltk.corpus.gutenberg.words(fileid)
num_vocab1 = len(set(w.lower() for w in fi ))
num_vocab2 = len(set(w for w in fi ))
This will result in:
num_vocab1 = 12452
num_vocab2 = 14329
It mea... | https://stackoverflow.com/questions/79993518/python-nlp-usage-of-lower-function | python, nlp, nltk | 1,786,541,758 |
se_79976533 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why is my ESCO-based skill matcher so noisy, and where should I fix it? | Why is my ESCO-based skill matcher so noisy, and where should I fix it?
I’m working on a skill extraction pipeline that uses ESCO and a purely lexical matcher, and I’m seeing a lot of noisy results (e.g., “Spanish” as a skill just because the text mentions “Spanish SMEs”). I’d like help understanding where the core pr... | https://stackoverflow.com/questions/79976533/why-is-my-esco-based-skill-matcher-so-noisy-and-where-should-i-fix-it | typescript, nlp, taxonomy, lexical, tooling-recommendation | 1,783,436,588 |
se_25785145 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to split arabic documents into multiple sentences | How to split arabic documents into multiple sentences
Is there any method to split arabic documents into multiple sentences. Currently I'm using "." for sentence splitting.
I'm looking for better sentence splitting models such as the ones available for English in opennlp. | https://stackoverflow.com/questions/25785145/how-to-split-arabic-documents-into-multiple-sentences | tooling-recommendation, nlp, arabic | 1,410,431,490 |
se_69626530 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Looking for the right framework to implement an enterprise document management and analysis system | Looking for the right framework to implement an enterprise document management and analysis system
I have already spent quite some time with literature reviews and Google searches, but I didn't find anything suitable, yet.
The task is to implement a flexible and scalable enterprise document management and analysis sys... | https://stackoverflow.com/questions/69626530/looking-for-the-right-framework-to-implement-an-enterprise-document-management-a | tooling-recommendation, nlp, frameworks, document, analysis | 1,634,627,899 |
se_69373420 | stackoverflow | ARTIFICIAL_INTELLIGENCE | _batch_encode_plus() got an unexpected keyword argument 'return_attention_masks' | _batch_encode_plus() got an unexpected keyword argument 'return_attention_masks'
I am studying RoBERTA model to detect emotions in tweets.
On Google colab. Following this Noteboook file from Kaggle - https://www.kaggle.com/ishivinal/tweet-emotions-analysis-using-lstm-glove-roberta?scriptVersionId=38608295
Code... | https://stackoverflow.com/questions/69373420/batch-encode-plus-got-an-unexpected-keyword-argument-return-attention-masks | python, nlp, google-colaboratory, bert-language-model, roberta-language-model | 1,632,906,177 |
se_79974140 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I detect intentional ambiguity in user text and preserve it during paraphrasing? | How can I detect intentional ambiguity in user text and preserve it during paraphrasing?
I am building an NLP system that paraphrases user text while keeping the original meaning intact. In some cases, the user’s wording is intentionally ambiguous, for example to preserve privacy, politeness, or to avoid giving too mu... | https://stackoverflow.com/questions/79974140/how-can-i-detect-intentional-ambiguity-in-user-text-and-preserve-it-during-parap | nlp, text-processing, ambiguity, language-model | 1,783,093,073 |
se_79969015 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Evaluating long-term memory limits in stateless LLM chatbots — feedback needed | Evaluating long-term memory limits in stateless LLM chatbots — feedback needed
I’m working on a research project exploring how stateless LLM-based chatbots handle long conversations and whether important earlier information is still reliably retained over time.
My idea is to:
Run a chatbot using an LLM API without an... | https://stackoverflow.com/questions/79969015/evaluating-long-term-memory-limits-in-stateless-llm-chatbots-feedback-needed | machine-learning, nlp, chatbot, large-language-model | 1,782,665,641 |
se_79966633 | stackoverflow | ARTIFICIAL_INTELLIGENCE | External-memory approach for BPE training where merges depend on text adjacency (160 GB corpus) | External-memory approach for BPE training where merges depend on text adjacency (160 GB corpus)
I have a Byte-Pair Encoding tokenizer with an extension called supermerges (ref., arXiv 2504.00178). Supermerges join two words that sit next to each other in the text, so for training I have to load the whole corpus in ord... | https://stackoverflow.com/questions/79966633/external-memory-approach-for-bpe-training-where-merges-depend-on-text-adjacency | rust, data-structures, nlp, stringtokenizer, memory-access | 1,782,354,823 |
se_67440324 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Pytorch TypeError: only integer tensors of a single element can be converted to an index | Pytorch TypeError: only integer tensors of a single element can be converted to an index
I am trying to use pytorch in a case for nlp binary classification and i need help to finish the neural network training and validate. I am newbie and this is my first time using pytorch, see the code below and the error...
X_trai... | https://stackoverflow.com/questions/67440324/pytorch-typeerror-only-integer-tensors-of-a-single-element-can-be-converted-to | python, neural-network, nlp, pytorch, tensor | 1,620,413,660 |
se_78056561 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How are tools passed to llm? (final prompt sent to openai chat model) | How are tools passed to llm? (final prompt sent to openai chat model)
When using the openai chat api, we send an array of messages and tools. How are they assembled into a single prompt?
System:
Tools:
User:
Assistant:
User:
I tried setting langchain.debug = True, but I don't see the tools being passed to the llm.
fr... | https://stackoverflow.com/questions/78056561/how-are-tools-passed-to-llm-final-prompt-sent-to-openai-chat-model | nlp, openai-api, langchain | 1,708,875,186 |
se_79951883 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What are the default BM25 parameters in LlamaIndex BM25Retriever, and how can they be explicitly verified? | What are the default BM25 parameters in LlamaIndex BM25Retriever, and how can they be explicitly verified?
I am using LlamaIndex’s BM25Retriever as part of a Retrieval-Augmented Generation (RAG) pipeline:
from llama_index.retrievers.bm25 import BM25Retriever
bm25_retriever = BM25Retriever.from_defaults(nodes=nodes, s... | https://stackoverflow.com/questions/79951883/what-are-the-default-bm25-parameters-in-llamaindex-bm25retriever-and-how-can-th | python, nlp, information-retrieval, llama-index | 1,780,667,630 |
se_79960493 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does my dual-KG Edge RAG make sense and how to Evaluate? Connecting 2 Knowledge Graphs. BA thesis | Does my dual-KG Edge RAG make sense and how to Evaluate? Connecting 2 Knowledge Graphs. BA thesis
I'm working on a KG-RAG system for Labor Law and company HR policies for my BA thesis due in 2 weeks and I just realized some problems with the KG.
I have 2 questions: 1 regarding the Edge called IMPLEMENTS and how to com... | https://stackoverflow.com/questions/79960493/does-my-dual-kg-edge-rag-make-sense-and-how-to-evaluate-connecting-2-knowledge | python, nlp, evaluation, rag, knowledge-graph | 1,781,592,980 |
se_78294720 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error when calling Hugging Face load_dataset("glue", "mrpc") | Error when calling Hugging Face load_dataset("glue", "mrpc")
I'm following the huggingface tutorial here and it's giving me a strange error. When I run the following code:
from datasets import load_dataset
from transformers import AutoTokenizer, DataCollatorWithPadding
from torch.utils.data import ... | https://stackoverflow.com/questions/78294720/error-when-calling-hugging-face-load-datasetglue-mrpc | python, nlp, huggingface, huggingface-datasets | 1,712,604,073 |
se_14472333 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Retrieving verb stems from a list of verbs | Retrieving verb stems from a list of verbs
I have a list of strings which are all verbs. I need to get the word frequencies for each verb, but I want to count verbs such as "want", "wants", "wanting" and "wanted" as one verb. Formally, a “verb” is defined as a set of 4 words that are of the form {X, Xs, Xed, Xing} or ... | https://stackoverflow.com/questions/14472333/retrieving-verb-stems-from-a-list-of-verbs | python, regex, string, list, nlp | 1,358,914,276 |
se_79956866 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best pre-trained vision model for multi-plant disease detection in async web back-end | Best pre-trained vision model for multi-plant disease detection in async web back-end
I'm building a web app with FastAPI + async/await Python backend. Users upload leaf photos via API and the server should return: 1) plant species, 2) disease label or "healthy".
Constraints:
Generalization: Must handle multiple crop... | https://stackoverflow.com/questions/79956866/best-pre-trained-vision-model-for-multi-plant-disease-detection-in-async-web-bac | tensorflow, machine-learning, nlp, artificial-intelligence, huggingface-transformers | 1,781,234,440 |
se_79930898 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Recursive Algorithm Needs Speed Up | Recursive Algorithm Needs Speed Up
def find_suffix_chain(word: str, start_pos: str, root: str,
current_chain: List = None, visited: Set = None,
shared_cache: dict = None) -> List:
"""
Recursive suffix chain finder with optional shared cross-root cache.
Cache key:... | https://stackoverflow.com/questions/79930898/recursive-algorithm-needs-speed-up | python-3.x, algorithm, recursion, nlp | 1,776,968,981 |
se_79949356 | stackoverflow | ARTIFICIAL_INTELLIGENCE | quanteda finds string that don't match the regex | quanteda finds string that don't match the regex
Consider the following example:
library(quanteda)
testcorpus <- c(
"I play the piano",
"He plays the piano",
"They played the piano",
"I play the saxophone",
"I play the Roland piano"
)
tokenized <- tokens(testcorpus)
kk <- kwic(tokenized, phrase(c("\\bpla... | https://stackoverflow.com/questions/79949356/quanteda-finds-string-that-dont-match-the-regex | r, nlp, quanteda | 1,780,248,886 |
se_79948257 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LDA Topic Modeling: Balancing Coherence Score (C_v) vs. Discrepant Downstream Predictor Importances | LDA Topic Modeling: Balancing Coherence Score (C_v) vs. Discrepant Downstream Predictor Importances
I am a novice in topic modeling, and I would appreciate feedback and opinions from experts in the field. I am currently stuck on the concept of evaluating and finalizing my results.
I am working on an NLP pipeline using... | https://stackoverflow.com/questions/79948257/lda-topic-modeling-balancing-coherence-score-c-v-vs-discrepant-downstream-pr | python, nlp, lda, topic-modeling | 1,780,031,967 |
se_70508199 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Differences between Rasa and other Conversational AI platforms | Differences between Rasa and other Conversational AI platforms
Apart from being open source, what can other Conversational AI platforms (wit.ai, Lex, DialogFlow..) do that Rasa can't? | https://stackoverflow.com/questions/70508199/differences-between-rasa-and-other-conversational-ai-platforms | nlp, dialogflow-es, amazon-lex, rasa, wit.ai | 1,640,700,526 |
se_79911354 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using LLM models downloaded from huggingface with langgraph | Using LLM models downloaded from huggingface with langgraph
I downloaded the weights of a llama model from huggingface. It works for simple tasks, but I don't know how to use it with langgraph to create agents or how to bind tools.
Here is how I downloaded it:
model_id = "meta-llama/Llama-3.2-3B-Instruct"
pipeline = t... | https://stackoverflow.com/questions/79911354/using-llm-models-downloaded-from-huggingface-with-langgraph | machine-learning, nlp, large-language-model, ollama, langgraph | 1,774,012,424 |
se_79936102 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Inconsistent result with tokenization | Inconsistent result with tokenization
I'm building a list of bigrams from my text data in Python. I want to have punctuation as tokens as well. Here's my code:
def get_all_bigrams():
data = ""
with open("data.txt", "r") as dataset:
data = dataset.read()
puncs: list = find_all_punctuations(data)
... | https://stackoverflow.com/questions/79936102/inconsistent-result-with-tokenization | python, nlp | 1,777,936,789 |
se_74552512 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Extract information about education institute, grades, year and degree from text using NLP in Python | Extract information about education institute, grades, year and degree from text using NLP in Python
I want to extract information about education institute, degree, year of passing and grades (CGPA/GPA/Percentage) from text using NLP in Python.
For example, if I have the input:
NBN Sinhgad School Of Engineering,Pune... | https://stackoverflow.com/questions/74552512/extract-information-about-education-institute-grades-year-and-degree-from-text | python, nlp, nltk, spacy | 1,669,234,490 |
se_24317095 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is one way to find related names using the web? | What is one way to find related names using the web?
I am dealing with name disambiguation issues. I'm wondering if there's a way to find all common usages of a word by using the web to 'crowdsource' those related names.
For instance, in my data, I have the term 'UC Berkeley'. Can I use a google search (or some other... | https://stackoverflow.com/questions/24317095/what-is-one-way-to-find-related-names-using-the-web | python, nlp | 1,403,216,108 |
se_79935415 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can I do a topic model for pre processing, find the topics I want and then do a second one? | Can I do a topic model for pre processing, find the topics I want and then do a second one?
Looking to do word disambiguition on a dataset with polyssemy. I already tried KB and supervised but they don't capture all the meanings, so I thought to do a first cluster, and then preprocess t the meaning I want, and then a... | https://stackoverflow.com/questions/79935415/can-i-do-a-topic-model-for-pre-processing-find-the-topics-i-want-and-then-do-a | nlp, social-media, branding | 1,777,809,546 |
se_79928214 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What are a good books to read in Bayesian Learning? | What are a good books to read in Bayesian Learning?
Seems like Bayesian learning is the go to method now for reducing over fitting in ML models, I've read Manning's NLP in action, Deep Learning with python, O'Reilly Deep Learning foundations, Hands on learning with sickit learn and tensorflow ( the most prolific ML bo... | https://stackoverflow.com/questions/79928214/what-are-a-good-books-to-read-in-bayesian-learning | deep-learning, nlp, artificial-intelligence, bayesian-networks, bayesian-deep-learning | 1,776,589,050 |
se_79935122 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Brand disambiguition project architecture | Brand disambiguition project architecture
I am currently working on the Prada entity filtering task and have encountered a few challenges.
Since all data was collected using the query “Prada”, the problem is not entity detection but context disambiguation. I explored knowledge bases (e.g., Wikidata, YAGO), but they do... | https://stackoverflow.com/questions/79935122/brand-disambiguition-project-architecture | nlp, social-media, branding | 1,777,740,317 |
se_63171714 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is it necessary to lemmatize the text and remove stopwords for NER? | Is it necessary to lemmatize the text and remove stopwords for NER?
I'm working on the project where there are several paragraphs of text in which I must extract certain entities using NER. (I'm using SPACY)
Here is the sample data:
Mr XYZ, XX year old, who was the victim of motor vehicle accident that
occurred on XX... | https://stackoverflow.com/questions/63171714/is-it-necessary-to-lemmatize-the-text-and-remove-stopwords-for-ner | python, python-3.x, nlp, spacy | 1,596,106,712 |
se_54334304 | stackoverflow | ARTIFICIAL_INTELLIGENCE | spaCy: Can't find model 'en_core_web_sm' | spaCy: Can't find model 'en_core_web_sm'
What is the difference between spacy.load('en_core_web_sm') and spacy.load('en')? This link explains different model sizes. But I am still not clear how spacy.load('en_core_web_sm') and spacy.load('en') differ
spacy.load('en') runs fine for me. But the spacy.load('e... | https://stackoverflow.com/questions/54334304/spacy-cant-find-model-en-core-web-sm | python, python-3.x, nlp, spacy | 1,548,271,461 |
se_72463970 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Spacy: Can't find model 'en_core_web_sm'. in a virtual environment | Spacy: Can't find model 'en_core_web_sm'. in a virtual environment
I'm trying to load the en_core_web_sm spaCy model, but I have been unsuccessful in doing so.
The error that occurs is the following:
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path t... | https://stackoverflow.com/questions/72463970/spacy-cant-find-model-en-core-web-sm-in-a-virtual-environment | python, nlp, anaconda, conda, spacy | 1,654,095,288 |
se_79910307 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to visualize high-dimensional sentence embeddings (BERT/mBART) in 2D or 3D using Python? | How to visualize high-dimensional sentence embeddings (BERT/mBART) in 2D or 3D using Python?
I’m working with sentence embeddings generated from transformer models (e.g., BERT/mBART), and I want to visualize the embedding space to better understand semantic similarity.
For example, I have a dataset like this:
sentence... | https://stackoverflow.com/questions/79910307/how-to-visualize-high-dimensional-sentence-embeddings-bert-mbart-in-2d-or-3d-u | python, nlp, bert-language-model, dimensionality-reduction | 1,773,872,193 |
se_79925350 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Character-level BPE | Character-level BPE
This is probably a stupid question, but.
I'm building a character-level BPE algorithm for use in a Language Model. I am training it on 10k articles I got from Wikipedia Dump, the code used to get the data:
import os
import re
from datasets import load_dataset
def clean_text(text):
text = text... | https://stackoverflow.com/questions/79925350/character-level-bpe | python, nlp, language-model, byte-pair-encoding | 1,776,169,332 |
se_25902119 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to read the output of scikit-learn TfidfVectorizer | How to read the output of scikit-learn TfidfVectorizer
I was reading about TfidfVectorizer implementation of scikit-learn. For example:
new_docs = ['He watches basketball and baseball', 'Julie likes to play basketball', 'Jane loves to play baseball']
new_term_freq_matrix = tfidf_vectorizer.transform(new_docs)
print tf... | https://stackoverflow.com/questions/25902119/how-to-read-the-output-of-scikit-learn-tfidfvectorizer | python, machine-learning, scikit-learn, nlp, feature-extraction | 1,410,997,834 |
se_79917583 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to access public Facebook posts using an API (Open Source) My goal is to retrieve real-time | How to access public Facebook posts using an API (Open Source) My goal is to retrieve real-time
public posts (text) for use in our system. The best lead I have found so far is the Meta Content Library (MCL) API. Is this the right approach, or is there a better technique for implementing this? Please note that this is ... | https://stackoverflow.com/questions/79917583/how-to-access-public-facebook-posts-using-an-api-open-source-my-goal-is-to-ret | facebook, nlp | 1,774,939,798 |
se_79917042 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best approach to generate embeddings for 10K+ documents in Spring Boot + OpenSearch (performance issue) | Best approach to generate embeddings for 10K+ documents in Spring Boot + OpenSearch (performance issue)
I am building a search system using Spring Boot and OpenSearch.
Current setup:
Using OpenSearch ingest pipeline with text_embedding processor
Each ZIP file contains 10K+ documents
Bulk indexing is used
Problem:
I... | https://stackoverflow.com/questions/79917042/best-approach-to-generate-embeddings-for-10k-documents-in-spring-boot-opensea | spring-boot, machine-learning, nlp, opensearch, jmix | 1,774,864,838 |
se_79917285 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does my on-prem OCR + RAG pipeline design lead to poor retrieval performance? | Why does my on-prem OCR + RAG pipeline design lead to poor retrieval performance?
I am building an on-prem document processing system using:
- OCR for scanned PDFs
- Embeddings for indexing
- RAG for retrieval and question answering
However, I’m seeing issues with retrieval quality and latency when combining OCR outpu... | https://stackoverflow.com/questions/79917285/why-does-my-on-prem-ocr-rag-pipeline-design-lead-to-poor-retrieval-performance | python, nlp, large-language-model | 1,774,893,086 |
se_71055114 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to tokenize/parse data in an Excel sheet using spaCy | How to tokenize/parse data in an Excel sheet using spaCy
I try to convert an Excel sheet into a doc object using spaCy. I spent the last couple of days trying to go around it but it seems a bit challenging. I have opened the sheet in both OpenPyXL and Pandas. I can read the Excel sheet and output the content but I co... | https://stackoverflow.com/questions/71055114/how-to-tokenize-parse-data-in-an-excel-sheet-using-spacy | excel, nlp, spacy, doc | 1,644,432,548 |
se_76963311 | stackoverflow | ARTIFICIAL_INTELLIGENCE | llama-cpp-python not using NVIDIA GPU CUDA | llama-cpp-python not using NVIDIA GPU CUDA
I have been playing around with oobabooga text-generation-webui on my Ubuntu 20.04 with my NVIDIA GTX 1060 6GB for some weeks without problems. I have been using llama2-chat models sharing memory between my RAM and NVIDIA VRAM. I installed without much problems following the ... | https://stackoverflow.com/questions/76963311/llama-cpp-python-not-using-nvidia-gpu-cuda | python, python-3.x, nlp, llama, llama-cpp-python | 1,692,808,557 |
se_30285706 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Detecting similar paragraphs in two documents | Detecting similar paragraphs in two documents
I am trying to find similar paragraphs in 2 documents. Each document has many paragraphs of multiple lines of text. The text in paragraphs has some changes. The words can be inserted or deleted or miss-spelled. For example
Doc1.Para
This is one line of text
Doc2.Para
T... | https://stackoverflow.com/questions/30285706/detecting-similar-paragraphs-in-two-documents | machine-learning, nlp | 1,431,857,239 |
se_58897973 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Which algorithms most reliably solve substitution ciphers? | Which algorithms most reliably solve substitution ciphers?
I am studying a problem which reduces to the cryptanalysis of a lengthy monoalphabetic substitution ciphertext written in a known language. This problem is easy enough to be solved by hand using frequency analysis and word patterns, as described in Sinkov's El... | https://stackoverflow.com/questions/58897973/which-algorithms-most-reliably-solve-substitution-ciphers | algorithm, nlp, frequency-analysis, linguistics, cryptanalysis | 1,573,970,691 |
se_77947637 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Disable Safety Settings in Gemini Vision Pro Model Using API? | How to Disable Safety Settings in Gemini Vision Pro Model Using API?
Question:
I'm currently working with the Gemini Vision Pro model and I'm encountering issues with certain images while using the model through its API. Here's a simplified version of the code I'm using to access the model:
python:-
import google.gene... | https://stackoverflow.com/questions/77947637/how-to-disable-safety-settings-in-gemini-vision-pro-model-using-api | python, nlp, google-gemini, google-generativeai | 1,707,221,945 |
se_608743 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Strategies for recognizing proper nouns in NLP | Strategies for recognizing proper nouns in NLP
I'm interested in Natural Language Processing (NLP). What are strategies for recognizing nouns in a text that aren't based on dictionary recognition? | https://stackoverflow.com/questions/608743/strategies-for-recognizing-proper-nouns-in-nlp | nlp, named-entity-recognition, part-of-speech | 1,236,124,605 |
se_79912299 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Implementing Deterministic Entity Resolution in a Multi-Agent RAG for Investigative Archiving | Implementing Deterministic Entity Resolution in a Multi-Agent RAG for Investigative Archiving
Body:
I am architecting a Forensic Data Audit system (Multi-Agent RAG) to analyze fragmented, large-scale archives. A critical bottleneck is maintaining Entity Resolution (ER) across millions of unstructured tokens.
The Chall... | https://stackoverflow.com/questions/79912299/implementing-deterministic-entity-resolution-in-a-multi-agent-rag-for-investigat | python-3.x, nlp, named-entity-recognition, py-langchain, rag | 1,774,186,801 |
se_79913234 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Improving precision in LLM-based binary classification by detecting ambiguous cases | Improving precision in LLM-based binary classification by detecting ambiguous cases
I’m working on a prompt-based binary classification task using an LLM, where the main goal is to maximize precision.
Instead of assigning a label to every input, I want the system to:
• Assign a label only when confident
• Flag amb... | https://stackoverflow.com/questions/79913234/improving-precision-in-llm-based-binary-classification-by-detecting-ambiguous-ca | machine-learning, nlp, classification, large-language-model, text-classification | 1,774,330,277 |
se_61329906 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In R, how to do named entity recognition? | In R, how to do named entity recognition?
I have looked at this guide https://lincolnmullen.com/projects/dh-r2/nlp.html and this youtube video https://www.youtube.com/watch?v=0lpQludiI-0 which both use the same method. When I try and replicate the results from the biography example in the first link, all I get as the ... | https://stackoverflow.com/questions/61329906/in-r-how-to-do-named-entity-recognition | r, nlp, opennlp, named-entity-recognition | 1,587,408,900 |
se_79903249 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to design similarity search for mechanical products | How to design similarity search for mechanical products
I have a website which shows different products about machines and its different parts. There are 10000 of product pages, and want to build a functionality which shows similar product pages and associated parts when someone visiting one product page.
So, for this... | https://stackoverflow.com/questions/79903249/how-to-design-similarity-search-for-mechanical-products | deep-learning, nlp, neural-network, graph-neural-network | 1,772,974,426 |
se_76319374 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Transliteration from a source language to Roman (English) script | Transliteration from a source language to Roman (English) script
We need the Romanization feature badly. Can someone please help? We want to transliterate (not translate) from Hindi (Devanagiri script) language to English (Roman script) language.
Input
romanize_text('अंतिम लक्ष्य क्या है')
Expected Output
'antim laksh... | https://stackoverflow.com/questions/76319374/transliteration-from-a-source-language-to-roman-english-script | machine-learning, nlp, google-api, artificial-intelligence, transliteration | 1,684,887,848 |
se_52145992 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do we analyse a loss vs epochs graph? | How do we analyse a loss vs epochs graph?
I'm training a language model and the loss vs epochs is plotted each time of training. I'm attaching two samples from it.
Obviously, the second one is showing better performance. But, from these graphs, when do we take a decision to stop training (early stopping)?
Can w... | https://stackoverflow.com/questions/52145992/how-do-we-analyse-a-loss-vs-epochs-graph | machine-learning, nlp, lstm, pytorch, recurrent-neural-network | 1,535,963,680 |
se_79882478 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best way to generate embeddings for structured product attributes in B2B ecommerce search? | Best way to generate embeddings for structured product attributes in B2B ecommerce search?
I am building a B2B product search system using vector embeddings and would like advice specifically on how to generate embeddings for structured product attributes.
Context
Domain: B2B ecommerce
Queries: Short keyword-style s... | https://stackoverflow.com/questions/79882478/best-way-to-generate-embeddings-for-structured-product-attributes-in-b2b-ecommer | nlp, embedding, information-retrieval, vector-search, semantic-search | 1,770,185,092 |
se_79898673 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Distributed computing with Ray/Python has no parallelism at all on GCP | Distributed computing with Ray/Python has no parallelism at all on GCP
I am trying to setup a distributed environment for NLP processing. I use Ray and Python on GCP. I have a master and several workers. What happens is that when I run 1 worker or 8 workers, it takes same amount of time to have 10 results. There is no... | https://stackoverflow.com/questions/79898673/distributed-computing-with-ray-python-has-no-parallelism-at-all-on-gcp | python, google-cloud-platform, nlp, distributed-computing, ray | 1,772,325,807 |
se_79898560 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to handle inconsistent speech recognition results in a low-resource language application | How to handle inconsistent speech recognition results in a low-resource language application
I am working on a language learning application for a low-resource language, using speech recognition to support pronunciation and speaking practice.
One issue I encounter is that the same spoken sentence can produce slightly ... | https://stackoverflow.com/questions/79898560/how-to-handle-inconsistent-speech-recognition-results-in-a-low-resource-language | machine-learning, nlp, speech-recognition | 1,772,305,133 |
se_79898374 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Sentence Transformer Stuck at Loading (Google Cloud Instance) | Sentence Transformer Stuck at Loading (Google Cloud Instance)
I use this code to load sentence transformer in a GCP VM instance (no GPU). This is a dask plugin used on dask worker.:
class NLPSetup(WorkerPlugin):
def __init__(self, bucket_uri):
self.bucket_uri = bucket_uri
self.emb_model = None
... | https://stackoverflow.com/questions/79898374/sentence-transformer-stuck-at-loading-google-cloud-instance | google-cloud-platform, pytorch, nlp, dask, sentence-transformers | 1,772,276,652 |
se_59191144 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do attention network works? | How do attention network works?
Recently I was going through Attention is all you need paper, ongoing through it I found an issue regarding understanding the attention network if I ignore the maths behind it.
Can anyone make me understand the attention network with an example? | https://stackoverflow.com/questions/59191144/how-do-attention-network-works | text, nlp, transformer-model, attention-model | 1,575,535,124 |
se_79888084 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I save legacy gensim embeddings in a current format? | How can I save legacy gensim embeddings in a current format?
I need to use word embeddings that were generated a few years ago by someone else. In order to access the embeddings I had to "wind back" my version of Python to version 2.7.15.
Having now opened the file, I'd like to re-save the embeddings in a more modern ... | https://stackoverflow.com/questions/79888084/how-can-i-save-legacy-gensim-embeddings-in-a-current-format | nlp, gensim | 1,770,897,265 |
se_79891158 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to solve a checksum error with tfds.load | How to solve a checksum error with tfds.load
I'm trying to learn how to use Transformers with TensorFlow and I'm following this tutorial on the TensorFlow website:
https://www.tensorflow.org/text/tutorials/transformer
The problem I have is when I try the line:
tfds.load('ted_hrlr_translate/pt_to_en',with_info=True,as_... | https://stackoverflow.com/questions/79891158/how-to-solve-a-checksum-error-with-tfds-load | tensorflow, machine-learning, nlp, checksum | 1,771,359,789 |
se_79892084 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to optimize real-time multilingual speech translation pipeline latency (ASR + MT + TTS)? | How to optimize real-time multilingual speech translation pipeline latency (ASR + MT + TTS)?
Body:
I am building a real-time multilingual speech translation system that integrates:
Automatic Speech Recognition (ASR)
Language Identification (LID)
Machine Translation (MT)
Text-to-Speech (TTS)
The current architect... | https://stackoverflow.com/questions/79892084/how-to-optimize-real-time-multilingual-speech-translation-pipeline-latency-asr | nlp, architecture, speech-recognition, real-time, machine-translation | 1,771,493,720 |
se_76862437 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to configure the page number in the gcp document ai toolbox converter? | How to configure the page number in the gcp document ai toolbox converter?
I am trying to include the page number in the configuration JSON. I tried some ways, but no one works. Looking at the converter code on the GitHub page, I saw a lot of mentions of "page_number", so I think it's possible.
Also, there's some docu... | https://stackoverflow.com/questions/76862437/how-to-configure-the-page-number-in-the-gcp-document-ai-toolbox-converter | google-cloud-platform, deep-learning, nlp, named-entity-recognition, cloud-document-ai | 1,691,520,686 |
se_79880593 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Decoder only character level transformer returns base64 text only. How do I clean my dataset while streaming? | Decoder only character level transformer returns base64 text only. How do I clean my dataset while streaming?
I recently spent some time training a decoder only character level transformer. I had trained it with some README files that I found on the "stack" dataset.
Epoch: 45/50 | Train Loss: 0.8878 | Val Loss: 0.943... | https://stackoverflow.com/questions/79880593/decoder-only-character-level-transformer-returns-base64-text-only-how-do-i-clea | machine-learning, deep-learning, nlp, dataset, data-cleaning | 1,769,964,664 |
se_64911499 | stackoverflow | ARTIFICIAL_INTELLIGENCE | huggingface transformer models: KeyError: 'input_ids' message at beginning of BERT model training | huggingface transformer models: KeyError: 'input_ids' message at beginning of BERT model training
Using the Huggingface transformer library, I am encountering a bug in the final step when I go to fine tune the BERT language model for masked language modelling task. I am looking to fine tune it for an in domai... | https://stackoverflow.com/questions/64911499/huggingface-transformer-models-keyerror-input-ids-message-at-beginning-of-be | python, nlp, bert-language-model | 1,605,788,220 |
se_36046913 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Where can I find some open databases with linguistic ontologies? | Where can I find some open databases with linguistic ontologies?
Are there open databases with linguistic ontology? I need it for research (ontology of some text or some subject area). These ontologies will be used as standard.
Maybe there are databases with manually built ontologies and built using some tools. | https://stackoverflow.com/questions/36046913/where-can-i-find-some-open-databases-with-linguistic-ontologies | nlp, ontology, linguistics | 1,458,162,351 |
se_30201788 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Natural language processing libraries | Natural language processing libraries
What library and datasets go together? I've found:
CoreNLP - Java
NLTK - Python
OpenNLP - Java
ClearNLP - Java
Some are missing features. For example OpenNLP didn't have a dependency parsing. I need a library that's quick, will do dependency parsing, and part of speech tagging.
... | https://stackoverflow.com/questions/30201788/natural-language-processing-libraries | nlp, nltk, stanford-nlp, opennlp | 1,431,466,336 |
se_11148405 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Examples of English Natural Language Processing | Examples of English Natural Language Processing
I want to make a calendar that accepts English input better than those that exist. Stanford's NLP, is it helpful to this task? I can't find examples of people using it. Should an app actually understand the language? It seems like the natural English calendars are lookin... | https://stackoverflow.com/questions/11148405/examples-of-english-natural-language-processing | parsing, nlp, stanford-nlp | 1,340,322,332 |
se_5867129 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best path to get into natural language processing | Best path to get into natural language processing
I want to know the best way to learn about NLP from theory to practice, no matter the language.
Theory:
First learn the basic grammar.
Then learn about first order logic, description logic, etc.
Technical:
Learn Prolog.
Learn about OpenCyc.
For web applications you ... | https://stackoverflow.com/questions/5867129/best-path-to-get-into-natural-language-processing | python, nlp, prolog, opencyc | 1,304,412,407 |
se_19202112 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I learn practical natural language processing? | How can I learn practical natural language processing?
From a background in Java, Pascal, PERL, SQL, and R I want to find a least resistance path to (semi-) automated extraction of concepts from text and turning the result into something statistically analyzable. I imagine I will need to perform some NLP tasks on text... | https://stackoverflow.com/questions/19202112/how-can-i-learn-practical-natural-language-processing | java, frameworks, nlp | 1,381,003,205 |
se_3831487 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Java parser for natural language | Java parser for natural language
I am looking for a parser (or generated parser) in Java.
I will provide sentences that are part-of-speech tagged. I will use my own tag set.
I don't have any statistical data. So if the parser is statistical, I want to use it without this feature.
Adaptable to other languages easily. ... | https://stackoverflow.com/questions/3831487/java-parser-for-natural-language | java, parsing, nlp | 1,285,856,516 |
se_3101580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Natural language query processing libraries | Natural language query processing libraries
I am looking for natural language processing libraries to convert English queries to SQL statements. For example "show the list of employees whose age is 30" should be converted to select * from employees where age = 30.
Can you provide pointers/references? | https://stackoverflow.com/questions/3101580/natural-language-query-processing-libraries | java, nlp | 1,277,296,313 |
se_7168342 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Need resources for Statistical Natural Language Processing | Need resources for Statistical Natural Language Processing
I'm writing a program in Java to parse natural language using probability and statistics. Are there any resources that explain Statistical Natural Language Processing techniques? | https://stackoverflow.com/questions/7168342/need-resources-for-statistical-natural-language-processing | java, statistics, nlp | 1,314,138,786 |
se_78489915 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to lemmatize text column in pandas dataframes using stanza? | How to lemmatize text column in pandas dataframes using stanza?
I read csv file into pandas dataframe.
My text column is df['story']. How do I lemmatize this column?
Should I tokenize before? | https://stackoverflow.com/questions/78489915/how-to-lemmatize-text-column-in-pandas-dataframes-using-stanza | pandas, nlp, tokenize, lemmatization, stanza | 1,715,862,890 |
se_79875544 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to parse informal Persian number words into an integer currency value (Rial) | How to parse informal Persian number words into an integer currency value (Rial)
I need to convert informal Persian user input that represents a monetary amount into a single integer value in rials in python.
The input is free-form and may include:
Persian number words (e.g. یک, پنجاه)
Informal / colloquial spellings... | https://stackoverflow.com/questions/79875544/how-to-parse-informal-persian-number-words-into-an-integer-currency-value-rial | python, regex, parsing, nlp, text-processing | 1,769,320,331 |
se_79721627 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does the ProtBERT model generate identical embeddings for all non-whitespace-separated (single token?) inputs? | Why does the ProtBERT model generate identical embeddings for all non-whitespace-separated (single token?) inputs?
Why do non-identical inputs to ProtBERT generate identical embeddings when non-whitespace-separated?
I've looked at answers here etc. but they appear to be different cases where the slicing of the out.las... | https://stackoverflow.com/questions/79721627/why-does-the-protbert-model-generate-identical-embeddings-for-all-non-whitespace | python, nlp, bioinformatics, huggingface-transformers, bert-language-model | 1,753,982,235 |
se_79873328 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is "Small-to-Large" model staging a reliable proxy for LoRA hyperparameter tuning and data validation? | Is "Small-to-Large" model staging a reliable proxy for LoRA hyperparameter tuning and data validation?
I am designing a fine-tuning pipeline for a production-grade LLM and am operating under a strict R&D budget. To optimize costs, I am considering a Small-to-Large staging strategy.
The Workflow:
Stage 1 (Lo... | https://stackoverflow.com/questions/79873328/is-small-to-large-model-staging-a-reliable-proxy-for-lora-hyperparameter-tunin | machine-learning, nlp, huggingface-transformers, large-language-model, fine-tuning | 1,769,042,862 |
se_79872028 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using gold POS tags in SPACY to influence Dependency Parsing at inference time | Using gold POS tags in SPACY to influence Dependency Parsing at inference time
I’m working with spaCy v3.x on Italian product titles and I have trained a custom POS tagger and dependency parser on a domain-specific dataset.
In my use case, I sometimes need to override or correct POS tags for specific tokens (e.g., dis... | https://stackoverflow.com/questions/79872028/using-gold-pos-tags-in-spacy-to-influence-dependency-parsing-at-inference-time | nlp, spacy, spacy-3 | 1,768,916,504 |
se_79869294 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python/GenAI/LLM: Best practices for asking follow‑up questions to clarify user intent in a chatbot | Python/GenAI/LLM: Best practices for asking follow‑up questions to clarify user intent in a chatbot
I’m building a chatbot using Python, pydantic_ai, google_genai, and the gemini‑2.0‑flash‑lite model. The bot includes a module responsible for retrieving context from a knowledge base (RAG). The knowledge base itself is... | https://stackoverflow.com/questions/79869294/python-genai-llm-best-practices-for-asking-follow-up-questions-to-clarify-user | python, algorithm, nlp, artificial-intelligence, large-language-model | 1,768,558,225 |
se_2207168 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Elegant command-parsing in an OOP-based text game | Elegant command-parsing in an OOP-based text game
I'm playing with writing a MUD/text adventure (please don't laugh) in Ruby. Can anyone give me any pointers towards an elegant, oop-based solution to parsing input text?
We're talking about nothing more complex than "put wand on table", here. But everything need... | https://stackoverflow.com/questions/2207168/elegant-command-parsing-in-an-oop-based-text-game | ruby, language-agnostic, oop, nlp | 1,265,373,438 |
se_47274540 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to improve NLTK sentence segmentation? | How to improve NLTK sentence segmentation?
Given this paragraph from Wikipedia:
An ambitious campus expansion plan was proposed by Fr. Vernon F.
Gallagher in 1952. Assumption Hall, the first student dormitory, was
opened in 1954, and Rockwell Hall was dedicated in November 1958,
housing the schools of business and la... | https://stackoverflow.com/questions/47274540/how-to-improve-nltk-sentence-segmentation | python, nlp, nltk, tokenize, text-segmentation | 1,510,611,678 |
se_79865030 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Subword-method OOV showing 0.00% for all tokenizers but I think it shouldn't | Subword-method OOV showing 0.00% for all tokenizers but I think it shouldn't
I'm trying to analyse 4 tokenizers of my choice and I wanted to inlcude an OOV metric based on subword. The way it works is rather simple:
def compute_oov_rate_subword(tokenizer, sentences):
total_words = 0
oov_words = 0
... | https://stackoverflow.com/questions/79865030/subword-method-oov-showing-0-00-for-all-tokenizers-but-i-think-it-shouldnt | python, nlp, oov | 1,768,056,405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.