当输入命令:deepdive compile && deepdive do company_mention 时,出现了一下错误:





看到这错误时,一头雾水。搜了很多,在莫名地尝试中,问题就解决了。
解决方法启示:如何用Genia语料库训练斯坦福语法分析者?。文章里提到:

看到该用户的回答,我开始检查我的NLP是否安装或是否正确。于是我开始按照这篇教程,安装NLP: Stanford CoreNLP在linux系统中安装与使用 。当安装到第三步时,我就不能继续安装。然后我试着重新输入命令时,发现问题得到了解决,非常惊喜。
输入命令:deepdive compile && deepdive do company_mention,出现结果如图所示(直选部分截图),注意两张图的区别:


输入命令:deepdive compile && deepdive do transaction_candidate,出现结果如图所示(直选部分截图),注意区别:


该命令大概执行了两个小时左右,出现了一下错误:


问题2在教程里有提到,于是我先解决这个问题,解决方案如图所示:

将transform.py中company_full_short.csv的相对路路径改为绝对路路径,修改后的结果如图所示:

于是,问题就得到了解决。
输入命令:deepdive compile && deepdive do transaction_feature,生成特征数据库。再输入命令:deepdive query '| 20 ?- transaction_feature(_, _, feature).' ,查看⽣生成结果。




此时,数据库中所存在的表有7张,都是自动创建的,但数据库db_articles要事先创建好:

而且,就连之前未执行成功的一条命令,也执行成功了。

实验未完待续。。。
网友评论