
[英]import langchain => Error : TypeError: issubclass() arg 1 must be a class
我想在我的项目中使用 langchain。 所以我使用以下命令安装它: pip install langchain 但是在导入“langchain”时我面临以下错误: 谁能解决这个错误? ...
[英]import langchain => Error : TypeError: issubclass() arg 1 must be a class
我想在我的项目中使用 langchain。 所以我使用以下命令安装它: pip install langchain 但是在导入“langchain”时我面临以下错误: 谁能解决这个错误? ...
[英]Speech recognition via Sphinx engine produces AttributeError: 'NoneType' object has no attribute 'close'
我正在尝试使用以下代码转录视频,但收到以下错误:ERROR : transcribe_video_to_text audio.close() AttributeError: 'NoneType' object has no attribute 'close' 您能否分享您解决这个问题的 ...
[英]How to enable header in text files of load_dataset in huggingface?
我正在尝试使用 huggingface 加载文本文件( https://huggingface.co/docs/datasets/v1.2.1/loading_datasets.html ) 这个文本文件已经包含标题,我如何向模块指示它(例如, header = True ,如果是 pandas ...
[英]Python: BERT Error - Some weights of the model checkpoint at were not used when initializing BertModel
我正在使用bert-base-uncased uncased 在 PyTorch 中创建实体提取 model,但是当我尝试运行 model 时,出现此错误: 错误: 我从这里下载了 bert model 和其他文件代码以下是我的 model 的代码: ...
[英]Praat - Error when processing Pitch of .wav file: "minimum pitch must not be less than..."
我写 Praat 脚本才几周时间,所以请多多包涵。 我正在尝试在带注释的语音数据语料库中提取每个口语单词的音调轮廓。 我可以毫无问题地提取整个长声音文件的音高轮廓,我可以将 .wav 文件压缩成单个口语单词的 smaller.wav 文件,但是当我尝试循环遍历 smaller.wavs 时,我经常 ...
[英]ValueError: 'logits' and 'labels' must have the same shape for NLP sentiment multi-class classifier
我正在尝试制作一个 NLP 多类情感分类器,它将句子作为输入并将它们分为三类(消极、中性和积极)。 但是,在训练 model 时,我遇到了错误,我的 logits (None, 3) 与我的标签 (None, 1) 大小不同,model 无法开始训练。 我的 model 是一个多类分类器而不是多标签 ...
[英]Annotate Entity inside another Entity
我们必须提取一个位于另一个实体内部的实体,关于我们如何注释训练数据以为此任务训练 NER model 的任何想法。 我们使用 Flair model 进行自定义实体训练和预测。 例如:文本:“”地址:123, ABC Company, 4th floor, xyz street, state, co ...
[英]Can not run the code of this repository - NETL-Automatic-Topic-Labelling-
我正在尝试运行此代码- Automatic Labeling of Topics with Neural Embeddings 问题是他们没有提到他们使用的库和工具的版本。 可悲的是,他们甚至没有使用过哪个 Python 版本。 我已经开始尝试运行预训练模型,我已经按照他们的说明进行操作,但出现以 ...
[英]How to merge predicted values to original pandas test data frame where X_test has been converted using CountVectorizer before splitting
我想将我的测试数据的预测结果合并到我的 X_test 中。 我能够将它与 y_test 合并,但由于我的 X_test 是一个语料库,我不确定如何识别要合并的索引。 我的代码如下 这给了我 y_test 和 y_pred 但我不确定如何将 X_test 添加为原始数据框(X_test 的 ID)。 ...
[英]How can i get pooled output from deberta model?
任何人都可以告诉我如何从 deberta model 汇集 output 吗? 任何人都可以告诉我如何从 deberta model 汇集 output 吗? 我想在不使用 *DebertaForSequenceClassification * 的情况下将它从DebertaModel用于我的分类 ...
[英]Problems with tensorflow_hub in google Collab
我正在尝试在 Google Collab 中使用 BERT,并且import tensorflow_hub as hub 但它引发了 ValueError: 我相信这是版本冲突或类似的问题,但无法解决。 我已经尝试过重启环境,安装不同版本的tensorflow和tensorflow_hub等,但是 ...
[英]Gensim: Not able to load the id2word file
我正在对给定先前派生的 lda model 的新语料库进行主题推理。我能够完美地加载 model,但我无法加载 id2word 文件来创建语料库。 corpora.Dictionary需要 map 新语料库numbers: load方法返回一个不知道为什么的dict 属性错误。 下面是复制这种情况的 ...
[英]SetFit Model training on a custom dataset
我有一个 dataframe 有 3 列,我正在尝试使用 SetFit model 执行一些镜头文本分类 Dataframe (df) 传统的 SetFit model 接受两个输入即文本和 label 我想用额外的输入来训练 model,即 2 个输入 (A,B) 来预测 label (C)。 而 ...
[英]How to print outputs of a pretrained huggingface model?
我正在尝试根据预训练的 huggingface model 进行分类。如何打印 output(带标签的分类)? 答案应该是“敌人”有 label“1”,但如果我打印 output,答案是: 我错过了什么? ...
[英]How to access BERT's inter layer?
我想将 [batch_size, 768, text_length] 张量放入 BERT 的第 6 层。 我怎样才能给第六层输入? 我可以只取 6~ 最后一层 BERT 然后使用它吗? 谢谢你。 ...
[英]How to solve natural language inference using SentenceBERT?
如何使用微调的 SentenceBERT 模型(例如sentence-transformers/all-MiniLM-L6-v2 · Hugging Face )解决自然语言推理以获得更好的句子向量? 其中许多模型已经使用 SNLI 等自然语言推理数据集进行了微调,但我可以使用 SNLI 再次微调 ...
[英]How to pick up adjectives or nouns out of a text?
例如像: 所以我希望得到这样的 2 个列表: 我看到有人提到 NLTK,但我没有使用过 package,所以我希望得到一些说明。 ...
[英]Generating the plural form of a noun
给定一个词,它可能是也可能不是单数形式的名词,你将如何生成它的复数形式? 基于这个NLTK 教程和这个关于复数规则的 非正式列表,我写了这个简单的 function: 但我认为这是不完整的。 有一个更好的方法吗? ...
[英]Using multiple time Matcher in Spacy
我想在跨度(发送)列表中使用 Spacy 的 Matcherclass Chunker: def __init__(self, nlp, matcher): self.nlp = nlp self.matcher = matcher self. ...
[英]WER for wav2vec2-base model remains as 1 throughout the whole training process
我正在尝试运行 https 中共享的wav2vec2语音识别model://huggingface.co/docs/transformers/tasks/asr 这是训练过程中的loss和WER ,此时validation loss明显减少,而WER依然为1。 我尝试打印出预测值和 label 值 ...