当前位置:网站首页>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 !
边栏推荐
- [kvm] install KVM
- SQL time fuzzy query datediff() function
- Pat a1069/b1019 the black hole of numbers
- Jenkins 参数化构建中 各参数介绍与示例
- openFeign异步调用问题
- Machine vision series 3:vs2019 opencv environment configuration
- 请问,在sql client中,执行insert into select from job时,如何单
- 不会就坚持67天吧 平方根
- Not 67 days, square root
- 伏英娜:元宇宙就是新一代互联网!
猜你喜欢
随机推荐
开课!看smardaten如何分解复杂业务场景
Machine vision Series 2: vs DLL debugging
C language: structure simple syntax summary
Jenkins 参数化构建中 各参数介绍与示例
Machine vision Series 1: Visual Studio 2019 dynamic link library DLL establishment
不会就坚持64天吧 查找插入位置
12. Priority queue and inert queue
不会就坚持63天吧 最大的异或
It won't last for 70 days. The k-largest number in the array
Not for 58 days. Implement prefix tree
"Weilai Cup" 2022 Niuke summer multi school training camp 2H
The principle of inverse Fourier transform (IFFT) in signal processing
[kvm] create virtual machine from kickstart file
“蔚来杯“2022牛客暑期多校训练营1 J Serval and Essay(启发式合并)
C语言:联合体知识点总结
Fuzzy query of SQL
The structure pointer must be initialized, and the pointer must also be initialized
Change the value of the argument by address through malloc and pointer
Interview notes of a company
openFeign异步调用问题








