![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
自然语言处理
heize19
这个作者很懒,什么都没留下…
展开
-
学术前沿趋势分析 数据分析实战 (三)
参加了天池的学术前沿趋势分析比赛,这个比赛主要对arXiv论文完成对应的数据分析,这里整理下完成task的思路及踩过的坑: 下载数据集后的表结构如下: 1 分类统计 论文数量统计(数据统计任务):统计2019年全年,计算机各个方向论文数量 1.1 数据导入 先导包 import seaborn as sns #用于画图 from bs4 import BeautifulSoup import re import requests #用于网络连接,发送网络请求,使用域名获取对应信息 import json原创 2021-05-02 21:10:29 · 339 阅读 · 0 评论 -
《Python自然语言处理》第五章练习题答案
这章主要内容涉及分词、词性标注和标注器训练、字典使用。 因为中英文差别,所以在后面练习里尝试用中文数据来训练ngram标注器。 首先导包 import nltk from nltk.corpus import brown from nltk.book import * import jieba import matplotlib.pyplot as plt 1 #nltk词性标注无法消除歧义 text = nltk.word_tokenize('British Left Waffles on Falkla原创 2021-03-23 19:52:33 · 1370 阅读 · 0 评论 -
《Python自然语言处理》第三章练习题答案
第三章 这本书网上能找到的答案很少。 这一章主要涉及字符串处理、正则表达式、爬虫、列表推导等内容。 1 s = 'colorful' print(s[:3]+'u'+s[3:]) 2 s[-9] 4 s[::2] 5 s[::-1] 7 import re string = "The purpose of this research was to create a framework of indicators that enabled us to measure the classic dimen原创 2021-03-19 19:26:59 · 1608 阅读 · 2 评论 -
《Python自然语言处理》第二章练习题答案
第二章 最近要学nltk,这本书的练习题出的很好,自己写下来锻炼一下。 2 from nltk.corpus import gutenberg len(gutenberg.words('austen-persuasion.txt')) len(set(gutenberg.words('austen-persuasion.txt'))) 3 from nltk.corpus import brown brown.words(categories=['news','editorial']) 4 from n原创 2021-03-19 19:14:19 · 806 阅读 · 0 评论