自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (8)
  • 收藏
  • 关注

原创 记录nltk.download(‘stopwords‘)问题

nltk无法下载,显示[nltk_data] Error loading stopwords: <urlopen error [Errno 11004][nltk_data] getaddrinfo failed>解决方案:import nltkimport ssltry: _create_unverified_https_context = ssl._create_unverified_contextexcept AttributeError: pas

2022-03-10 16:14:24 491

原创 【无标题】记录pip Install gensim问题

记录问题:在conda里pip install gensim时出现问题:ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\__pycache__\\cython.cpython-38.pyc'Consider using the `--user` option or check the per

2022-03-10 16:06:28 649

原创 【无标题】英文文本词性识别

from textblob import TextBlobimport pandas as pd#报错Resource averaged_perceptron_tagger not found. Please use the NLTK Downloade的解决方法import nltknltk.download('averaged_perceptron_tagger')#读入数据Idea=pd.read_csv(r"E:\1.csv",encoding="utf-8")i=len(Ide.

2022-03-04 14:27:45 368

原创 英文文本相似性计算

本文使用python的gensim通过tf-idf计算文本相似性。相似度计算部分参考:https://www.jianshu.com/p/edf666d3995f1)导入相关包import jieba.posseg as psegimport codecsfrom gensim import corpora, models, similaritiesimport pandas as pdimport reimport stringfrom nltk.corpus import stopwo

2021-06-07 18:46:27 1104

原创 记录DataFrame constructor not properly called!解决方法

原代码:f1 = pd.DataFrame(deg,columns=[‘com_user_url’,‘degree_mul’])问题:解决代码:f1 = pd.DataFrame(list(deg),columns=[‘com_user_url’,‘degree_mul’])

2021-03-14 19:36:00 36897 10

原创 常用Excel函数

excel计算单词数公式:=IF(LEN(TRIM(E10))=0,0,LEN(TRIM(E10))-LEN(SUBSTITUTE(E10," “,”"))+1)计算大写字母公式:=SUMPRODUCT((CODE(MID(P7926,ROW(INDIRECT(“1:”&LEN(P7926))),1))>64)*(CODE(MID(P7926,ROW(INDIRECT(“1:”&LEN(P7926))),1))<91))判断是否含某字符:=IF(ISNUMBER(FIN

2021-03-08 09:43:58 227

原创 python文本可读性

可读性计算方法参考:https://python.ctolib.com/cdimascio-py-readability-metrics.html可读性计算方法有The Flesch Reading Ease formulaFlesch-Kincaid Grade LevelThe Fog Scale (Gunning FOG Formula)The SMOG IndexAutomated Readability IndexThe Coleman-Liau IndexLinsear Wri

2020-08-02 16:05:14 3368 10

原创 python信息熵的计算

信息熵:信息熵越大,信息越多,与以前的消息相比,措辞越独特,信息熵越高参考:信息熵求解部分:https://www.jianshu.com/p/468e2af86d59导入包import numpy as npimport pandas as pdimport nltkimport reimport stringfrom nltk.corpus import stopwordsfrom nltk.tokenize import word_tokenizefrom nltk.stem.p

2020-08-02 15:25:05 4084 2

原创 Python做简单情感分析

英文:(1)准备:需要首先安装textblob包pip install -U textblobpython -m textblob.download_corpora(2)导入包from textblob import TextBlobimport pandas as pd(3)读入数据Idea=pd.read_csv(r"E:\IdeasTest.csv",usecols=['Ideas'] )i=len(Idea)print(i)(4)情感分析content=[]for x

2020-08-01 21:19:23 803 3

原创 R语言安装程序包时显示“退出狀態的值不是0”

问题描述在安装程序包readtext时,显示:安装程序包‘readtext’时退出狀態的值不是0问题原因R的版本太低解决方法升级R语言版本代码升级方式:install.packages("installr")library(installr)updateR()注意:有可能因为网速的问题导致updateR()无法正常运行...

2020-07-25 07:40:55 34680 11

原创 利用R语言进行LDA主题挖掘

1.设置工作路径#加载包tmlibrary("tm")#设置工作路径setwd(“E:/1”)corpus<-Corpus(DirSource(directory="E:/1",encoding="UTF-8",recursive=TRUE,mode="text"))#显示语料库有多少个文档corpus2.预处理语料库library("SnowballC")#设置停用词词典和自定义词汇myStopwords <- c(stopwords("english"), "Sal

2020-07-07 16:08:17 4656 9

原创 nltk.download('stopwords')网络连接问题

问题描述:要在nltk包中下载停用词nltk.download('stopwords')出现以下问题:解决方案换网络连接的IP地址。把原来自习室的网改成了手机开的热点。结果...

2019-12-27 16:54:11 2262 3

原创 记录一次失败的gensim安装经历

1. pip install gensimCollecting gensim Downloading https://files.pythonhosted.org/packages/09/ed/b59a2edde05b7f5755ea68648487c150c7c742361e9c8733c6d4ca005020/gensim-3.8.1-cp37-cp37m-win_amd64.whl (...

2019-12-27 15:41:43 3780

原创 安装gensim包

错误示例:pip install gensim的方法最初采用pip install gensim 的方法,但是总是出现问题conda install gensim的方法conda install gensim安到一半出错,说需要conda clean --packages,执行完命令还是不行conda install +路径+wel文件的方法首先确定自己电脑适合哪个版本的的wel...

2019-12-25 18:53:17 674

原创 No module named 'pip._vendor.progress.helpers'出错的解决方法

在cmd运行python的时候,pip是可以用的,但是在anaconda prompt中运行pip就会有以下问题:因此pip所有功能都实现不了。试过的方法有下载pip-19.2.3-py2.py3-none-any.whl然后用conda安装之类乱七八糟的方法都不行直到发现了这个问题(https://blog.csdn.net/qq_21437451/article/details/8...

2019-09-25 21:55:40 885

原创 菜菜菜鸟学python之包的安装——以itchat为例(python+Anaconda)

太长不看版在Windows运行里pip install itchat找python安装目录下的Lib→site-packages找到安装上的文件夹(与itchat相关的所有文件夹)复制到anaconda安装目录下Lib→site-packages在anaconda里import itchat 就可以啦!在搜python中LDA的应用时发现可以用python的itchat来分析自己微信好...

2019-09-25 11:01:56 2050 1

原创 pip无法正常使用

python菜菜菜鸟,以此记录出现的问题及解决方法。之前pip都是可以用的,但是后来再安装wordcloud包的时候出现了问题,导致anaconda也无法使用(这个问题太大了,还没解决),后来连pip都无法使用了,显示ModuleNotFoundError: No module named ‘pip._vendor.progress.helpers’在网上找了各种方法,有说到https://p...

2019-09-25 10:45:41 525

管科类国外顶级期刊2016.xlsx

管科类国外顶级期刊2016.xlsx

2021-09-12

参考文献格式及代号含义

参考文献格式及代号含义

2021-09-12

stopwords.txt

适合中文文本分析使用

2021-06-07

IdeaContent.csv

适合文本分析学习测试使用

2021-06-07

倾向得分匹配法(PSM)举例及stata实现.pdf

倾向得分匹配法(PSM)举例及stata实现.pdf

2021-04-13

210413用户创意.py

SalesForce根据用户URL爬取用户创意信息

2021-04-13

CNENstopwords.txt

在进行汉语自然语言处理时候,分词是必不可少的环节,但是在实际的自然语言中,有很多的非实意词语或者其他并没有实际作用的词语,这些词语我们必须在分词环节后进行过滤—这个环节也就是过滤停用词.不过想要获得好的分词效果,必须首先进行比较好的分词处理.本资源为CNEN停用词

2020-07-07

text mining文本挖掘.rar

北京大学计算机科学技术研究所文本挖掘研究生课程,包含17个子文件,有特征提取、检索、分类、聚类、TDT、过滤、关联等

2020-07-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除