Closed grivescorbett closed 8 years ago
For models using spotlight 7 you should use this branch: https://github.com/idio/spotlight-model-editor/tree/feature/code-clean-up-0-7
@grivescorbett did using that branch solved the problem?
My apologies for the delay, I'm still getting this error in a couple of different environments. In OS X / Intellij these are the steps I took:
- extract http://spotlight.sztaki.hu/downloads/latest_models/en.tar.gz to /Users/grivescorbett/projects/untapt/spotlight/en
- git clone https://github.com/idio/spotlight-model-editor.git
- cd spotlight-model-editor
- git checkout feature/code-clean-up-0-7
- Open IntelliJ, import POM project, select JDK 1.7
- Run scala console
- var spotlightModel = org.idio.dbpedia.spotlight.Main.getSpotlightModel("/Users/grivescorbett/projects/untapt/spotlight/en/model")
scala> spotlightModel.showSomeSurfaceForms(10)
INFO 2016-05-04 11:15:12,048 Thread-14 [MemoryStore$] - Loading MemoryQuantizedCountStore...
INFO 2016-05-04 11:15:12,123 Thread-14 [MemoryStore$] - Done (74 ms)
INFO 2016-05-04 11:15:12,123 Thread-14 [MemoryStore$] - Loading MemorySurfaceFormStore...
INFO 2016-05-04 11:15:20,177 Thread-14 [MemorySurfaceFormStore] - Summing total SF counts.
INFO 2016-05-04 11:15:21,100 Thread-14 [MemorySurfaceFormStore] - Creating reverse-lookup for surface forms, adding normalized surface forms.
INFO 2016-05-04 11:15:25,391 Thread-14 [MemoryStore$] - Done (13268 ms)
INFO 2016-05-04 11:15:39,343 Thread-14 [MemoryStore$] - Loading MemoryResourceStore...
-1
Error during Java deserialization.
Serialization trace:
ontologyTypeStore (org.dbpedia.spotlight.db.memory.MemoryResourceStore)
java.lang.NullPointerException
at org.idio.dbpedia.spotlight.CustomSpotlightModel$$anonfun$showSomeSurfaceForms$1.apply(CustomSpotlightModel.scala:440)
at org.idio.dbpedia.spotlight.CustomSpotlightModel$$anonfun$showSomeSurfaceForms$1.apply(CustomSpotlightModel.scala:438)
at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:70)
at org.idio.dbpedia.spotlight.CustomSpotlightModel.showSomeSurfaceForms(CustomSpotlightModel.scala:438)
at .<init>(<console>:12)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request$$anonfun$14.apply(IMain.scala:920)
at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV$sp(Line.scala:43)
at scala.tools.nsc.io.package$$anon$2.run(package.scala:25)
at java.lang.Thread.run(Thread.java:745)
Ubuntu with JDK 7, branch feature/code-clean-up-0-7 gives the same results.
mm sounds like something could have changed in spotlight's code base. I'm going to try to reproduce it
Yeah a new jar was used to serialize the stores.
I updated the jar that : https://github.com/idio/spotlight-model-editor/tree/feature/code-clean-up-0-7
depends on.
That made it work for me.
could you please delete the folder : ~/.m2/repository/org/dbpedia/spotlight/0.7
and give it another go. That should make it work
Looks great, thanks!
After running
sh target/bin/model-editor explore /home/ubuntu/spotlight/en/model/ 20
against this model file: http://spotlight.sztaki.hu/downloads/latest_models/en.tar.gzI'm getting this error: