dlwh / epic

**Archived** Epic is a high performance statistical parser written in Scala, along with a framework for building complex structured prediction models.
http://scalanlp.org/
Apache License 2.0
469 stars 82 forks source link

Compilation failed #42

Closed freeze5272 closed 9 years ago

freeze5272 commented 9 years ago

Hi, there are two errors occurred when I tried to build epic.

2015-09-29 12 53 02

Is there any possible way that I can fix it?

reactormonk commented 9 years ago

Could you post it as string instead of image? For copy/pasting.

freeze5272 commented 9 years ago

[error] /Users/edward/Downloads/epic-master-2/target/scala-2.11/src_managed/main/TreebankTokenizerImpl.java:7327: unclosed character literal

[error] return currentToken(new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead).replace('???', '\'').replace('??','\u0308').replaceAll("-[\n\r]+",""));

[error] ^

[error] /Users/edward/Downloads/epic-master-2/target/scala-2.11/src_managed/main/TreebankTokenizerImpl.java:7327: unclosed character literal

[error] return currentToken(new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead).replace('???', '\'').replace('??','\u0308').replaceAll("-[\n\r]+",""));

[error] ^

[error] two errors found

error Compilation failed

dlwh commented 9 years ago

the file encoding for compiling the java code is wrong. It's a UTF-8 file, and I guess that needs to be set. You could either change your terminal's default encoding, or do something like

javacOptions ++= Seq("-encoding", "UTF-8")

in build.sbt

-- David

On Tue, Sep 29, 2015 at 4:14 AM, freeze5272 notifications@github.com wrote:

[error] /Users/edward/Downloads/epic-master-2/target/scala-2.11/src_managed/main/TreebankTokenizerImpl.java:7327: unclosed character literal

[error] return currentToken(new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead).replace('???', '\'').replace('??','\u0308').replaceAll("-[\n\r]+",""));

[error] ^

[error] /Users/edward/Downloads/epic-master-2/target/scala-2.11/src_managed/main/TreebankTokenizerImpl.java:7327: unclosed character literal

[error] return currentToken(new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead).replace('???', '\'').replace('??','\u0308').replaceAll("-[\n\r]+",""));

[error] ^

[error] two errors found

error Compilation failed

— Reply to this email directly or view it on GitHub https://github.com/dlwh/epic/issues/42#issuecomment-144029307.