Commit d6889e26 by Yuan

Add new file

parent 2270968c
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment