Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Problem with English Parser in Scala 2.10 #26

Closed

Description

@dice89

Hi Epic Team,

I love using your library but get an error when using the english parser in scala 2.10:

Exception in thread "main" java.io.InvalidClassException: breeze.linalg.Counter2$$anon$1; local class incompatible: stream classdesc serialVersionUID = -8653601685403516672, local class serialVersionUID = 6118148492784004600
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1707)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
    at epic.models.ClassPathModelLoader.load(ModelLoader.scala:23)
    at epic.models.DelegatingLoader.load(ModelLoader.scala:33)
    at epic.models.PosTagSelector$.loadTagger(PosTagModelLoader.scala:13)
    at de.unima.dws.oamatching.measures.StringMeasureHelper$.addPosTag(StringMeasureHelper.scala:116)
    at de.unima.dws.oamatching.measures.StringMeasureHelper$delayedInit$body.apply(StringMeasureHelper.scala:18)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
    at scala.App$class.main(App.scala:71)
    at de.unima.dws.oamatching.measures.StringMeasureHelper$.main(StringMeasureHelper.scala:15)
    at de.unima.dws.oamatching.measures.StringMeasureHelper.main(StringMeasureHelper.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Activity

  1. dlwh commented on Feb 2, 2015

    @dlwh
    Owner

    Could you paste your build.sbt file, at least the epic parts?
    On Feb 2, 2015 1:32 PM, "reactormonk" notifications@github.com wrote:

    That looks like you're using incompatible versions of the model and the
    epic library. @dlwh https://github.com/dlwh could you mark the
    dependencies of the model jars to be more clear?

    —
    Reply to this email directly or view it on GitHub
    #26 (comment).

  2. dice89 commented on Feb 2, 2015

    @dice89
    Author
    name := "ontologymatcher"
    
    version := "1.0"
    
    scalaVersion := "2.10.4"
    
    libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"
    
    libraryDependencies += "org.apache.spark" %% "spark-mllib" % "1.2.0"
    
    libraryDependencies += "net.sourceforge.owlapi" % "owlapi-distribution" % "4.0.1"
    
    libraryDependencies += "org.apache.jena" % "jena-core" % "2.12.1"
    
    libraryDependencies += "edu.cmu.lti" % "ws4j" % "1.0.1"
    
    libraryDependencies += "com.github.tototoshi" %% "scala-csv" % "1.1.1"
    
    libraryDependencies += "net.debasishg" %% "redisclient" % "2.13"
    
    libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.8"
    
    libraryDependencies += "secondstring" % "secondstring" % "20120620"
    
    libraryDependencies += "net.sf.jwordnet" % "jwnl" % "1.4_rc3"
    
    libraryDependencies += "fr.inrialpes.exmo" % "ontosim" % "2.4"
    
    libraryDependencies += "org.apache.lucene" % "lucene-analyzers-common" % "4.10.3"
    
    libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.8"
    
    libraryDependencies += "de.unima.alex" % "owlsimflood" % "1.0"
    
    libraryDependencies +=  "org.scalaj" %% "scalaj-http" % "1.1.1"
    
    libraryDependencies += "org.scalanlp" % "epic_2.10" % "0.3"
    
    libraryDependencies += "org.scalanlp" % "english_2.10" % "2015.1.25"
    
    resolvers += "Local Maven Repository" at "file:///Users/mueller/.m2/repository/"
    
    resolvers += "Third Party" at "http://trianacode.org/maven/"
    
  3. dlwh commented on Feb 2, 2015

    @dlwh
    Owner

    I must have messed up the objects. I'll see if I can fix tonight, otherwise
    it'll be a couple of weeks.
    On Feb 2, 2015 1:57 PM, "Alexander Mueller" notifications@github.com
    wrote:

    name := "ontologymatcher"

    version := "1.0"

    scalaVersion := "2.10.4"

    libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"

    libraryDependencies += "org.apache.spark" %% "spark-mllib" % "1.2.0"

    libraryDependencies += "net.sourceforge.owlapi" % "owlapi-distribution" %
    "4.0.1"

    libraryDependencies += "org.apache.jena" % "jena-core" % "2.12.1"

    libraryDependencies += "edu.cmu.lti" % "ws4j" % "1.0.1"

    libraryDependencies += "com.github.tototoshi" %% "scala-csv" % "1.1.1"

    libraryDependencies += "net.debasishg" %% "redisclient" % "2.13"

    libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.8"

    libraryDependencies += "secondstring" % "secondstring" % "20120620"

    libraryDependencies += "net.sf.jwordnet" % "jwnl" % "1.4_rc3"

    libraryDependencies += "fr.inrialpes.exmo" % "ontosim" % "2.4"

    libraryDependencies += "org.apache.lucene" % "lucene-analyzers-common" %
    "4.10.3"

    libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.8"

    libraryDependencies += "de.unima.alex" % "owlsimflood" % "1.0"

    libraryDependencies += "org.scalaj" %% "scalaj-http" % "1.1.1"

    libraryDependencies += "org.scalanlp" % "epic_2.10" % "0.3"

    libraryDependencies += "org.scalanlp" % "english_2.10" % "2015.1.25"

    resolvers += "Local Maven Repository" at
    "file:///Users/mueller/.m2/repository/"

    resolvers += "Third Party" at "http://trianacode.org/maven/"

    —
    Reply to this email directly or view it on GitHub
    #26 (comment).

  4. dlwh commented on Feb 2, 2015

    @dlwh
    Owner

    i just double checked. i packaged up the parser right; it's on your end. I can't resolve two of your artifacts:

    unresolved dependency: fr.inrialpes.exmo#ontosim;2.4: not found
    unresolved dependency: de.unima.alex#owlsimflood;1.0: not found

    do maybe one of them depend on an old version of epic?

  5. dice89 commented on Feb 3, 2015

    @dice89
    Author

    Hi,

    sorry for the ontosim problem, this is local library of mine, but which is definetly not depending on epic. I just tested the english parsing with a new fresh project and a minimum example. I still get the same problem.

    I pushed it to github and you can check it out on your own:

    https://github.com/dice89/EpicTest

    Best wishes

    Alex

  6. reactormonk commented on Feb 3, 2015

    @reactormonk
    Collaborator

    @dlwh It's only the scala 2.10 versions that are incorrect, the 2.11 versions work.

  7. malcolmgreaves commented on Feb 4, 2015

    @malcolmgreaves

    Throwing my hat into the fray here...I have this exact same problem.

  8. dlwh commented on Feb 20, 2015

    @dlwh
    Owner

    Ok, should be fixed. epic release 0.3.1, model versions 2015.2.19 (will take an hour or so to make it into maven central.)

    Also included is a much improved sentence boundary detector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions