nlp - 斯坦福 CoreNLP 使用文件列表时如何跳过失败?
问题描述
我正在使用带有 filelist 参数的 stanfordCoreNLP。该程序似乎在 filelist.lst 中的某些文件处失败,并且 cmd 停止并退出。如何跳过失败继续完成对其余文件的分析?
java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP -props Props.properties
我已经在属性文件中添加了 continueOnAnnotateError 标志,但是在遇到坏文件时它仍然失败。
Props.properties 文件如下所示:
annotators = tokenize, ssplit, pos, parse, sentiment
outputFormat = JSON
outputDirectory = ./output_2020
timeout = 500000
output.includeText = False
parse.model = edu/stanford/nlp/models/srparser/englishSR.ser.gz
continueOnAnnotateError = True
filelist = ./flist253.lst
这是我使用 continueOnAnnotateError=True 得到的错误:
解决方案
你应该使用-continueOnAnnotateError
推荐阅读
- function-pointers - Emonlib+ADS1115+ESP32+Arduino 函数指针
- javascript - 赛普拉斯 - 断言仅存在一个带有文本的元素
- c# - 从纯文本中解析换行符
- gitlab - 如何在 gitlab-ci 工件中排除除一个之外的所有文件
- python - Python Mysql 仅在有新值时才更新数据
- swift - Swift 编译器错误 - 传递给不带参数的调用的参数
- angular - Angular中的依赖注入/从类调用属于服务的方法
- javascript - 如何在 laravel 刀片中使用 JS 值
- reactjs - 从 Accordion.Collapse 组件中折叠 React-Bootstrap Accordion
- java - JAXB 解析属性位于单行的 xml 文件