Problem in building the project
NoamGit opened this issue · 6 comments
Hi,
I struggling to build the project in intelliJ using sbt. Up to now, I had to do the following changes (however I still have import errors)
in plugin.sbt
//addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0") // original code
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
in build.sbt
Initially, I received these warnings
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scalamacros#quasiquotes_2.12;2.1.0: not found
[warn] :: org.scalatest#scalatest_2.12;2.2.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
Then, I made the following changes
libraryDependencies ++= Seq(
"commons-lang" % "commons-lang" % "2.6", // original code
"org.scala-lang" % "scala-reflect" % "2.10.4" // original code
,"org.scalatest" %% "scalatest" % "2.2.4" % "test" // original code
// , "org.scalamacros" %% "quasiquotes" % "2.1.0"
)
// https://mvnrepository.com/artifact/org.scalatest/scalatest
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.0-SNAP9" % Test
Now the build works, but when I try runMain example.ArithmeticParser (3 + 5) * 2
to I get
[error] /home/noam/GitHub/projects/upshot-montague/src/main/scala/canvas/CanvasOrganizationContext.java:29:1: package com.fasterxml.jackson.annotation does not exist
[error] import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
[error] /home/noam/GitHub/projects/upshot-montague/src/main/scala/canvas/CanvasOrganizationContext.java:30:1: package com.fasterxml.jackson.annotation does not exist
[error] import com.fasterxml.jackson.annotation.JsonProperty;
I seems that not all dependencies are ready, and that maybe excluding "quasiquotes" wasn't the right choice.
Any suggestions how to build and run the project?
Relevant details:
- Fairly novice in Scala
- System: Ubuntu 16.04, SDK java 1.8.0, scala-sdk-2.10.6 (VERSION 12)
I think your Scala version is too old. Can you upgrade to Scala 2.12, revert your changes to build.sbt, and try again?
It is Scala 2.12.
I tried also to clear the .ivy cache and now, when I run runMain example.ArithmeticParser (3 + 5) * 2
I get the following error
[error] import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
Seems like there is a problem importing
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
Try excluding the sql_old
directory from the build, or just deleting it (it's a collection of old code that's not currently used). What happens then?
Although it should already be excluded based on the excludeFilter
in build.sbt
, so I'm not sure why that's not working for you ...
Hi,
Thanks for the quick responses.
I ended up doing the following changes
plugins.sbt
//addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
build.sbt
libraryDependencies ++= Seq(
"commons-lang" % "commons-lang" % "2.6",
"org.scala-lang" % "scala-reflect" % "2.10.4"
// ,"org.scalatest" %% "scalatest" % "2.2.4" % "test"
// , "org.scalamacros" % "quasiquotes" % "2.1.0"
)
// https://mvnrepository.com/artifact/org.scalatest/scalatest
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.0-SNAP9" % Test
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.6"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.3"
unmanagedJars in Compile += file(Path.userHome+"/unmanaged_jar/quasiquotes_2.10-2.1.1.jar")
Apparently, I had big problems importing quasiquotes
so I've ended up adding it as unmanaged jars.
Now the build is OK and I can run the runMain example.ArithmeticParser (3 + 5) * 2
example, however i get
Input: (3 +/- 5) * 2
Output: (failed to parse)
[success] Total time: 0 s, completed Jan 10, 2018...
as output.
Should this work out of scratch?
Also, did you provide in this repo the SQL translator code (from logical form)?
*FYI, the link to CCGBank lexicon from Julia Hockenmaier's site is broken.
Thanks again
Hi NoamGit,
You're right – there was a bug in the ArithmeticParser
example. I've just pushed a fix. Thanks for catching that!
I also just included the lexicon.wsj02-21.gz
file in the data
directory, so that you can try the OldCcgBankParser
example.
As far as the SQL translation code goes, we do have some of it in the sql_old
directory (see sql_old/README
. It's incomplete (we couldn't include all of the UPSHOT code for a variety of reasons, and it has not been refactored to work with montague
), but it can provide a useful starting point for building your own English->SQL pipeline in montague
(or in general).
Hope that helps!
Alex