Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何将标记化中的多单词名称保留在一起?
我想使用 TF IDF 特征对文档进行分类 一种方法是 from sklearn feature extraction text import TfidfVectorizer import string import re import n
scikitlearn
NLP
NLTK
spacy
namedentityrecognition
使用 Python NLTK 对大型 (>70MB) TXT 文件进行标记。连接并将数据写入流错误
首先 我是 python nltk 的新手 所以如果问题太基本 我深表歉意 我有一个大文件 我正在尝试对其进行标记 我遇到内存错误 我读过的一种解决方案是一次一行读取文件 这是有道理的 但是 在这样做时 我收到错误cannot concat
python
NLTK
tokenize
如何从 nltk 下载器中删除数据/模型?
我在 python3 NLTK 中安装了一些 NLTK 包 通过nltk download 尝试过它们 但不需要它们 现在想删除它们 我怎样才能删除例如包large grammars来自我的 NLTK 安装 我不想删除完整的 NLTK 安装
python
directory
NLTK
deletefile
如何提取句子中的主语及其各自的从属短语?
我正在尝试在句子中进行主题提取 以便我能够根据主题获得情感 我在用nltk在 python2 7 中用于此目的 以下面的句子为例 Donald Trump is the worst president of USA but Hillary
python
NLP
NLTK
spacy
NLTK:包错误?朋克和泡菜?
基本上 我不知道为什么会收到此错误 只是为了获得更多图像 这里有一个代码格式的类似消息 由于是最新的 该帖子的答案已经在消息中提到 Preprocessing raw texts LookupError Traceback most rec
python
commandline
package
NLP
NLTK
NLTK 中的 wordnet lemmatizer 不适用于副词 [重复]
这个问题在这里已经有答案了 from nltk stem import WordNetLemmatizer x WordNetLemmatizer x lemmatize angrily pos r Out 41 angrily 这是 nl
python
NLP
NLTK
WordNet
使用正则表达式标记化进行 NLP 词干提取和词形还原
定义一个函数 名为performStemAndLemma 它需要一个参数 第一个参数 textcontent 是一个字符串 编辑器中给出了函数定义代码存根 执行以下指定任务 1 对给出的所有单词进行分词textcontent 该单词应包含字
python
python3x
NLP
NLTK
如何下载 NLTK 数据?
更新的答案 NLTK 适用于 2 7 我有3 2 我卸载了3 2并安装了2 7 现在可以了 我已经安装了 NLTK 并尝试下载 NLTK 数据 我所做的是按照该网站上的说明进行操作 http www nltk org data html h
python
NLTK
快速NLTK解析成语法树
我正在尝试将数百个句子解析为语法树 我需要快速完成 问题是如果我使用 NLTK 那么我需要定义一个语法 而我不知道我只知道它会是英语 我尝试使用this https github com emilmont pyStatParser统计解析器
python
NLP
NLTK
NLTK 中的无监督 HMM 训练
我只是想进行非常简单的无监督 HMM 训练nltk http www nltk org 考虑 import nltk trainer nltk tag hmm HiddenMarkovModelTrainer from nltk corpu
NLP
NLTK
hiddenmarkovmodels
用于估计(一元)困惑度的 NLTK 包
我正在尝试计算我所拥有的数据的困惑度 我正在使用的代码是 import sys sys path append usr local anaconda lib python2 7 site packages nltk from nltk co
python27
NLP
NLTK
NGram
languagemodel
使用 MaltParser 和 NLTK 进行依存分析
考虑一下这个句子 new sent PeterParker loves MaryJane 我尝试使用 malparser 和 NLTK 解析这句话 如下所示 maltParser nltk parse malt MaltParser wor
Parsing
dependencies
NLTK
将 python NLTK 解析树保存到图像文件[重复]
这个问题在这里已经有答案了 这可能会复制这个 stackoverflowquestion https stackoverflow com questions 23429117 saving nltk drawn parse tree to
python
Parsing
Tree
NLP
NLTK
在python 2.7中打印阿拉伯/波斯字母[重复]
这个问题在这里已经有答案了 在下面的代码中 Python 似乎不支持阿拉伯字母 有任何想法吗 usr bin python coding utf 8 import nltk sentence tokens nltk word tokeniz
python
python27
UTF8
NLTK
如何在 nltk 中使用 hunpos 标记文本文件?
有人可以帮我解决在 nltk 中标记语料库的 hunpos 语法吗 我要导入什么hunpos HunPosTagger module http nltk googlecode com svn trunk doc api nltk tag h
python
NLTK
corpus
postagger
如何提取数字(以及比较形容词或范围)
我正在用 Python 开发两个 NLP 项目 它们都有类似的任务提取数值和比较运算符来自句子 如下所示 greater than 10 weight not more than 200lbs height in 5 7 feets fas
python
regex
NLP
NLTK
spacy
在 Databricks 中的 pyspark 数据帧上下载 punkt 时出现 NLTK 查找错误
我试图通过对 Databricks 中的 pyspark 数据框应用余弦相似度来查找文本列 标题 标题 的相似性 我的函数称为 cosine sim udf 为了能够使用它 我必须进行第一次 udf 转换 将函数应用于 df 后出现查找错误
machinelearning
PySpark
NLTK
Databricks
如何从 nltk 分类器获得精度和召回率?
import nltk from nltk corpus import movie reviews from nltk tokenize import word tokenize documents list movie reviews w
python
python27
NLTK
词干函数错误:词干需要一个位置参数
这里的stem函数显示错误 指出stem需要循环中的一个位置参数 如所讨论的 from nltk stem import PorterStemmer as ps text my name is pythonly and looking fo
python
python3x
NLP
NLTK
porterstemmer
下载NLTK数据时出现PermissionError
我使用 Anaconda 的 Python 3 6 3 发行版 它安装了 NLTK 但没有安装我项目所需的 NLTK DATA 问题是 当我尝试安装时 nltk download I get PermissionError Errno 13
python
shell
Anaconda
NLTK
1
2
3
4
5
6
...14
»