gpt4 book ai didi

java - 杜克大学 - org.apache.lucene.analysis.standard.StandardAnalyzer

转载 作者:行者123 更新时间:2023-12-02 03:47:46 26 4
gpt4 key购买 nike

https://github.com/larsga/Duke - 我正在使用 Duke - 进行重复数据删除。

我已经设置了 Duke(jar 文件 - Duke jar 以及 lucene jar 添加到类路径中)..

github- https://github.com/larsga/Duke/wiki/SemanticDogfood 中的示例

When I tried running this : 
soundaryat@IMCHLT132:~/Duke$ java no.priv.garshol.duke.Duke --testfile=doc/example-data/dogfood-test.txt --testdebug --showmatches doc/example-data/dogfood.xml

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.lucene.analysis.standard.StandardAnalyzer.<init>(Lorg/apache/lucene/util/Version;)V
at no.priv.garshol.duke.databases.LuceneDatabase.<init>(LuceneDatabase.java:77)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at no.priv.garshol.duke.ConfigLoader.instantiate(ConfigLoader.java:292)
at no.priv.garshol.duke.ConfigLoader.access$100(ConfigLoader.java:31)
at no.priv.garshol.duke.ConfigLoader$ConfigHandler.startElement(ConfigLoader.java:199)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1140)
at no.priv.garshol.duke.ConfigLoader.load(ConfigLoader.java:49)
at no.priv.garshol.duke.Duke.main_(Duke.java:64)
at no.priv.garshol.duke.Duke.main(Duke.java:35)

然而,同一 github 中的另一个示例有效 - https://github.com/larsga/Duke/wiki/LinkingCountries

任何人都可以帮忙吗,..提前致谢..

最佳答案

我遇到了同样的问题,通过谷歌搜索我发现 Duke 与最新版本的 Lucene 不兼容。您使用的是 Lucene 5.X 吗?如果是这种情况,您应该下载旧版本的 Lucene jar (4.0.0) 并将它们包含在类路径中。它对我有用!

关于java - 杜克大学 - org.apache.lucene.analysis.standard.StandardAnalyzer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36161575/

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