Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
project_5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
20200519088
project_5
Commits
d6889e26
Commit
d6889e26
authored
Sep 26, 2020
by
Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
2270968c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
review
+23
-0
No files found.
review
0 → 100644
View file @
d6889e26
Summary:
建议还是自己先动手做做,先不要去参考老师的代码
Detailed Comments:
1、这个代码 sentence = sentence[:start] + ' ner_' + str(ner_dict_new[company_main_name]) + '_ ' + sentence[end-1:], 这个不需要end-1,直接end就好;具体为啥,你再看一下数据把;
2、vec=cv.fit_transform(corpus)#传入句子组成的list
arr=vec.toarray()这里不太建议,是使用toarray,一般在使用tfidf的时候,尽量慎用这个toarray,因为如果数据量大的话,tfidf训练的特征比较稀疏,容易爆内存;
3、 for relation in arcs_lst_com:
if relation in key_words:
cv = TfidfVectorizer()
vec[relation] = cv.fit_transform(relation)这里怎么直接训练一个字,这个地方需要修改下;
4、后面的从练习4开始,请继续完成;
Overall Score: 76
--------------------------------------------------------------------------------------------------------------------------
Thanks for your efforts.
-Your instructor
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment