当前位置:网站首页>Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
2022-07-29 04:18:00 【Kayd】
Preface
Subtitle in video 、 Image caption task , A dependency package that must be used is coco-caption. The main function of this dependency is to evaluate the accuracy of the description generated by the model , among spice.py In file , An error will be reported when executing the following command :
java -jar -Xmx8G spice-1.0.jar coco-caption/pycocoevalcap/spice/tmp/tmp1wdsxtug -out coco-caption/pycocoevalcap/spice/tmp/tmpkj4h9o4j -subset -silent
abnormal
Java abnormal
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/semgraph/semgrex/SemgrexPattern
at edu.anu.spice.SpiceParser.<clinit>(SpiceParser.java:64)
at edu.anu.spice.SpiceScorer.scoreBatch(SpiceScorer.java:70)
at edu.anu.spice.SpiceScorer.main(SpiceScorer.java:60)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.semgraph.semgrex.SemgrexPattern
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
spice error
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/ubuntu/jdk1.8.0_333/bin/java', '-jar', '-Xmx8G', 'spice-1.0.jar', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/tmp/tmp98_yx34s', '-cache', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/cache/1658759575.7687752', '-out', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/tmp/tmpicxj0dmv', '-subset', '-silent']' returned non-zero exit status 1.
Terminating BlobFetcher
resolvent
perform coco-caption Project directory get_stanford_models.sh File can .
bash get_stanford_models.sh
The specific process of this document is actually Download the package we lack . Its content is :
#!/usr/bin/env sh
# This script downloads the Stanford CoreNLP models.
CORENLP=stanford-corenlp-full-2015-12-09
SPICELIB=pycocoevalcap/spice/lib
JAR=stanford-corenlp-3.6.0
DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR if [ -f $SPICELIB/$JAR.jar ]; then echo "Found Stanford CoreNLP." else echo "Downloading..." wget http://nlp.stanford.edu/software/$CORENLP.zip echo "Unzipping..." unzip $CORENLP.zip -d $SPICELIB/ mv $SPICELIB/$CORENLP/$JAR.jar $SPICELIB/ mv $SPICELIB/$CORENLP/$JAR-models.jar $SPICELIB/ rm -f $CORENLP.zip rm -rf $SPICELIB/$CORENLP/ echo "Done."
fi
Perfect solution .
The end And the flower !
边栏推荐
猜你喜欢

C语言力扣第61题之旋转链表。双端队列与构造循环链表

不会就坚持67天吧 平方根

不会就坚持60天吧 神奇的字典

Jenkins 参数化构建中 各参数介绍与示例

When array is used as a function parameter, it is better to use the array size as a function parameter

14.haproxy+keepalived负载均衡和高可用

MPU6050

Machine vision Series 2: vs DLL debugging

Introduction and examples of parameters in Jenkins parametric construction

Compilation and linking
随机推荐
不会就坚持71天吧 链表排序
It won't last for 65 days. It only appears once
12.优先级队列和惰性队列
Fu Yingna: Yuan universe is the new generation of Internet!
[kvm] install KVM
2021 sist summer camp experience + record post of School of information, Shanghai University of science and technology
Won't you just stick to 69 days? Merge range
Beginner: array & String
C语言:typedef知识点总结
全屋WiFi方案:Mesh路由器组网和AC+AP
不会就坚持64天吧 查找插入位置
[paper translation] vectornet: encoding HD maps and agent dynamics from vectorized representation
BIO、NIO、AIO的区别和原理
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
对一个元素使用多种变形的方法
Codeforces Round #810 (Div. 2) D. Rain (线段树差分)
不会就坚持66天吧 权重生成随机数
"Weilai Cup" 2022 Niuke summer multi school training camp 2H
数据集成这个地方的过滤条件该咋写,用的啥语法?sql语法处理bizdate可以不
MPU6050