gpt4 book ai didi

java - Stanford Core NLP ner 4.0.0错误: Could not find or load main class stanford-ner.jar;lib.*

转载 作者:行者123 更新时间:2023-12-03 09:07:46 27 4
gpt4 key购买 nike

我正在尝试使用Stanford CoreNLP训练NER模型,但是找不到主类。我已经在我的CLASSPATH中包含了jar文件的路径,但仍然找不到它们。有什么办法解决这个问题吗?
C:\ Users \ apaul \ Desktop \ CoreNLP \ stanford-corenlp-4.0.0 \ stanford-ner-4.0.0> java -cp“C:\ Users \ apaul \ Desktop \ CoreNLP \ stanford-ner-4.0.0 * “-mx3g stanford-ner.jar; lib/* edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier classifiers \ english.all.3class.distsim.crf.ser.gz -textFile文件
提起_JAVA_OPTIONS:-Xmx256M
错误:找不到或加载主类stanford-ner.jar; lib。*

最佳答案

1.)放入C:\Users\apaul\Desktop\CoreNLP\stanford-corenlp-4.0.0\stanford-ner-4.0.02.)创建一个训练 Prop 文件,并将其放在该目录中。对于此示例,将其称为my-model.props。

# location of training data
trainFileList = /path/to/conll.3class.train
# location of test data
testFile = /path/to/all.3class.test
# where to store the saved model
serializeTo = ner.model.ser.gz

type = crf

wordFunction = edu.stanford.nlp.process.AmericanizeFunction

useDistSim = false

# establish the data file format
map = word=0,answer=1

saveFeatureIndexToDisk = true

useClassFeature=true
useWord=true
useNGrams=true
noMidNGrams=true
maxNGramLeng=6
usePrev=true
useNext=true
useLongSequences=true
useSequences=true
usePrevSequences=true
maxLeft=1
useTypeSeqs=true
useTypeSeqs2=true
useTypeySequences=true
useOccurrencePatterns=true
useLastRealWord=true
useNextRealWord=true
normalize=true
wordShape=chris2useLC
useDisjunctive=true
disjunctionWidth=5

readerAndWriter=edu.stanford.nlp.sequences.ColumnDocumentReaderAndWriter

useObservedSequencesOnly=true

useQN = true
QNsize = 25

# makes it go faster
featureDiffThresh=0.05
3.)在同一目录中运行 java -cp "*" -Xmx3g edu.stanford.nlp.ie.crf.CRFClassifier -prop my-model.props

关于java - Stanford Core NLP ner 4.0.0错误: Could not find or load main class stanford-ner.jar;lib.*,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63062982/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com