![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
戚兆禹
爱学习
展开
-
大部长python连接SQL
def eMysql(mysql_host,mysql_port,mysql_user,mysql_password,mysql_db,sql): try: db = pymysql.connect(host=mysql_host,port=mysql_port,user=mysql_user, password=mysql_password, db=mysql_db,ch转载 2018-01-15 17:52:44 · 127 阅读 · 0 评论 -
NLP学习笔记
import urllib from bs4 import BeautifulSoup import nltk # urllib is use to download the html content of the web link response = urllib.request.urlopen('http://python.org/') #You can read the entire co原创 2018-02-05 11:10:57 · 248 阅读 · 0 评论 -
NLP NLTK stopwords
from nltk.corpus import stopwords stoplist = stopwords.words('english') text = "this is just a test" cleanwordlist = [word for word in text.lower().split() if word not in stoplist] cleanwordlist Look原创 2018-02-05 11:55:46 · 9483 阅读 · 2 评论 -
nltk 机器学习。文本分类一整套
import nltk from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer import csv def preprocessing(text): #text = text.decode("utf8") # tokenize into words tokens = [word f转载 2018-02-07 14:47:06 · 799 阅读 · 1 评论