当我使用deeplearning4j时发生与警告消息相关的lucene

时间:2015-11-19 05:24:04

标签: java lucene word2vec

我在deeplearning4j中使用Word2vec来制作单词嵌入矩阵。为此,我的程序通过Vector<String>读取文本文件的绝对根,并初始化IteratorWord2vec变量。但是,当我在deeplearning4j中调用程序调用方法时,我遇到了警告消息。

这是一条警告信息。

  

14:06:56.556 [主要]警告o.d.t.i.LuceneInvertedIndex - 不能   create index org.apache.lucene.store.LockObtainFailedException:Lock   获得超时:   SleepingLockWrapper(MMapDirectory @ /用户/基民/文档/工作区/ MakeVector / word2vec指数   lockFactory=org.apache.lucene.store.NativeFSLockFactory@e24ddd0):   org.apache.lucene.store.LockObtainFailedException:由此持有的锁   虚拟机:   /Users/jhmin/Documents/Workspace/MakeVector/word2vec-index/write.lock     在   org.apache.lucene.store.SleepingLockWrapper.obtainLock(SleepingLockWrapper.java:102)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     在org.apache.lucene.index.IndexWriter。(IndexWriter.java:775)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     在   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex.tryCreateWriter(LuceneInvertedIndex.java:609)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex.getWriterWithRetry(LuceneInvertedIndex.java:574)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex.getWriter(LuceneInvertedIndex.java:623)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex.initReader(LuceneInvertedIndex.java:279)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex。(LuceneInvertedIndex.java:102)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex。(LuceneInvertedIndex.java:106)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.text.invertedindex.LuceneInvertedIndex $ Builder.build(LuceneInvertedIndex.java:893)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.models.word2vec.Word2Vec.buildVocab(Word2Vec.java:276)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   org.deeplearning4j.models.word2vec.Word2Vec.fit(Word2Vec.java:104)   [deeplearning4j-nlp-0.4-rc3.6.jar:na] at   jhmin.mining.test.word2vec.MakeVector.run(MakeVector.java:120)   [classes /:na] at jhmin.mining.test.word2vec.App.main(App.java:9)   [classes /:na]引起:   org.apache.lucene.store.LockObtainFailedException:由此持有的锁   虚拟机:   /Users/jhmin/Documents/Workspace/MakeVector/word2vec-index/write.lock     在   org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:127)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     在   org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     在   org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     在   org.apache.lucene.store.SleepingLockWrapper.obtainLock(SleepingLockWrapper.java:84)   〜[lucene-core-5.3.1.jar:5.3.1 1703449 - 贵族 - 2015-09-17 01:38:09]     ...省略了12个常见帧

我怎么能修复这条警告信息?

1 个答案:

答案 0 :(得分:0)

更新:我们已经离开了lucene。你不应该再看到这样的东西了。