jamr
jamr copied to clipboard
Instruction of Successfully Installing JAMR by Updating Packages
Reason of Failure
The original JAMR was installed in 2015 or 2016 in the server, thus some packages were broken or not updated. The default setup script in JAMR repos is set to a version no longer available. I have installed JAMR again on my Macbook (Mojave 10.14.6) and uploaded a new version in JAMR and share the details as following.
Install Pipeline
First, please ensure the following env:
JAVA=8.0 (Download from oracle website)
sbt=1.0.2, scala=2.11.8 (Use SDKMAN! to install, like sdk install scala 2.11.8
)
Then, modify these files:
-
jamr/project/build.properties
:
sbt.version=1.0.2
-
jamr/build.sbt
:
// import AssemblyKeys._ // assemblySettings name := "jamr" version := "0.1-SNAPSHOT" organization := "edu.cmu.lti.nlp" scalaVersion := "2.11.8" crossScalaVersions := Seq("2.11.8","2.11.12", "2.12.4","2.10.6") libraryDependencies ++= Seq( "com.jsuereth" %% "scala-arm" % "2.0", "edu.stanford.nlp" % "stanford-corenlp" % "3.4.1", "edu.stanford.nlp" % "stanford-corenlp" % "3.4.1" classifier "models", "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2", "org.scala-lang.modules" %% "scala-pickling" % "0.10.1" // "org.scala-lang" % "scala-swing" % "2.10.3" )
-
jamr/project/plugins.sbt
:
resolvers += "Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases" resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/" addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") // addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
PS: sbt-idea plugin had been unsupported since it was included into official Scala plugin about two years ago, and project files generated by outdated version of the plugin are not compatible with IntelliJ IDEA starting with version 14, if I recall correctly.
Finally, update the scala version in the CLASSPATH env variable in scripts/config.sh
(Thanks @danielhers and @zhangzx-sjtu for pointing this.)
export CLASSPATH=".:${JAMR_HOME}/target/scala-2.11/jamr-assembly-0.1-SNAPSHOT.jar"
After doing the above, install JAMR by.
. scripts/config.sh ./setup
Troubleshooting
- JAVA is inconsistent with Scala as mentioned in issue. Just install scala with
2.11.12
version and modified the corresponding lines injamr/build.sbt
andjava/scripts/config.sh
- Run
sbt
before running./setup
in the JAMR directory if the problem raises.
Acknowledgement
Thanks @LeonardoEmili for giving us a good summary https://github.com/jflanigan/jamr/issues/43#issuecomment-981128400 on success setup and created a PR on this issue. This issue was originated by issue under CoNLL2019 shared task and @danielhers gave many suggestions.
Good idea to use new versions of scala and sbt. Just to add that if we use scala 2.11.x (instead of 2.10.x), we should also do the following change in scripts/config.sh
:
export CLASSPATH=".:${JAMR_HOME}/target/scala-2.11/jamr-assembly-0.1-SNAPSHOT.jar"
We should change the scala folder name in CLASSPATH
from scala-2.10
to scala-2.11
, otherwise we will encounter the error "edu.cmu.lti.amr.CorpusTool not found" when running the aligner.
I wasted a lot of time on this silly directory error, so I mark a note here for other people's convenience :)
Good idea to use new versions of scala and sbt. Just to add that if we use scala 2.11.x (instead of 2.10.x), we should also do the following change in
scripts/config.sh
:
export CLASSPATH=".:${JAMR_HOME}/target/scala-2.11/jamr-assembly-0.1-SNAPSHOT.jar"
We should change the scala folder name in
CLASSPATH
fromscala-2.10
toscala-2.11
, otherwise we will encounter the error "edu.cmu.lti.amr.CorpusTool not found" when running the aligner. I wasted a lot of time on this silly directory error, so I mark a note here for other people's convenience :)
I met the same problem. However, changing the directory (from 2.10 to 2.11) seems not worked for me? Is there any other suggestions? THX
Thank you @DreamerDeo for sharing it, you saved my day!