acoli-repo / conll-transform

seamless conversion between different CoNLL/TSV dialects
Apache License 2.0
5 stars 2 forks source link

Getting error when trying to do sample call #5

Open AlanQuille opened 3 years ago

AlanQuille commented 3 years ago

Hi, I tried to do the sample call shown in the main README.md. This is the error I got:

image

I am using git bash on Windows 10, openjdk version "1.8.0_152-release".

chiarcos commented 2 years ago

Hi, apologies for late response. This is an issue with the path, I presume. It is possible that your Windows Java expects the path to look like "C:\Users..." instead of "/c/Users/...". I don't have Windows 10 at hand, but if you tell me how to figure out that we're running Windows 10 from the shell, we can modify run.sh, accordingly. So far, Windows compliancy has been tested with Cygwin only, and here, we rely on the variables in set.

Addition 2021-11-03: I was wrong here, it is an issue with the script, see my msg below. Please try again.

brgsk commented 2 years ago

@chiarcos I'm facing same issue, but on Manjaro.

After executing ./transform.sh CoNLL-U CoNLL-12 I keep getting an error:

error: invalid flag: ./conll-rdf/src/test/java
Usage: javac <options> <source files>
use --help for a list of possible options
error: compilation failed, did not find org/acoli/conll/transform/Transformer class in /home/b/4soft/conll-transform-master/bin

Do you happen to know what could be the issue? Thanks!

Directory structure for reference:


.
├── bin
├── conll-rdf
│   ├── compile.sh
│   ├── data
│   ├── doc
│   ├── examples
│   ├── lib
│   ├── LICENSE.data.txt
│   ├── LICENSE.main.txt
│   ├── owl
│   ├── pom.xml
│   ├── README.md
│   ├── run.sh
│   ├── src
│   └── target
├── data
│   ├── ACoLi-Dicts
│   ├── CoNLL-00
│   ├── CoNLL-01
│   ├── CoNLL-02
│   ├── CoNLL-03
│   ├── CoNLL-04-05
│   ├── CoNLL-08
│   ├── CoNLL-09
│   ├── CoNLL-11
│   ├── CoNLL-12
│   ├── CoNLL-99
│   ├── CoNLL-U
│   ├── CoNLL-X
│   ├── OMW
│   ├── PropBank
│   ├── TIAD-TSV
│   └── UniMorph
├── LICENSE
├── README.md
├── src
│   └── org
└── transform.sh

29 directories, 9 files```
chiarcos commented 2 years ago

I think I solved it with my last commit. In line 112, the script tries to compile a directory. However, this should only generate an error message, it should have worked anyway. Does it work now?

brgsk commented 2 years ago

No, I'm still getting an error while calling ./transform.sh -h

Here's the error message:

  OWL   CoNLL ontology, TTL format, defaults to conll-rdf/owl/conll.ttl
read CoNLL data from stdin, write to stdout
transform from SRC format to TGT format according to OWL
➤ ./transform.sh -h
synopsis: ./transform.sh [-help]
          ./transform.sh SRC TGT [OWL]
  -help list all supported formats
  SRC   source format
  TGT   target format
  OWL   CoNLL ontology, TTL format, defaults to conll-rdf/owl/conll.ttl
read CoNLL data from stdin, write to stdout
transform from SRC format to TGT format according to OWL
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertFalse;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:3: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertFalse;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:4: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertNotNull;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:4: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertNotNull;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:5: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertThrows;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:5: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertThrows;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:6: error: package uk.org.webcompere.modelassert.json does not exist
import static uk.org.webcompere.modelassert.json.JsonAssertions.assertJson;
                                                ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:6: error: static import only from classes and interfaces
import static uk.org.webcompere.modelassert.json.JsonAssertions.assertJson;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:16: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.BeforeEach;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:17: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Disabled;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:18: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertEquals;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:3: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertEquals;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:4: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertThrows;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:4: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertThrows;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:16: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.*;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:9: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Disabled;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:10: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerFactoryTest.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertThrows;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerFactoryTest.java:3: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertThrows;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerFactoryTest.java:8: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:4: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertEquals;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:4: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertEquals;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:20: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Disabled;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:21: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertEquals;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:3: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertEquals;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:4: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertNotEquals;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:4: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertNotEquals;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:5: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertNotNull;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:5: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertNotNull;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:6: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertTrue;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:6: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertTrue;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:16: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Disabled;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:17: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:3: error: package org.junit.jupiter.api does not exist
import static org.junit.jupiter.api.Assertions.assertEquals;
                                   ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:3: error: static import only from classes and interfaces
import static org.junit.jupiter.api.Assertions.assertEquals;
^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:10: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
                            ^
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:23: error: cannot find symbol
    @BeforeEach
    ^
  symbol:   class BeforeEach
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:28: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:39: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:49: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:59: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:71: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:83: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerTest.java:84: error: cannot find symbol
    @Disabled("Unimplemented Check")
    ^
  symbol:   class Disabled
  location: class CoNLLRDFManagerTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:22: error: cannot find symbol
    @Test
     ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:30: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:41: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:54: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:69: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLStreamExtractorFactoryTest.java:83: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLStreamExtractorFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:14: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:22: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:30: error: cannot find symbol
    @Disabled("log4j Level.toLevel method defaults to DEBUG. No Exception is thrown.")
    ^
  symbol:   class Disabled
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:31: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:39: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:46: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:53: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:60: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:66: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:73: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:79: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:86: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:103: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:111: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:118: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:134: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:142: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:149: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:165: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:173: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFUpdaterFactoryTest.java:183: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFUpdaterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerFactoryTest.java:12: error: cannot find symbol
    @Test
     ^
  symbol:   class Test
  location: class CoNLLRDFManagerFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerFactoryTest.java:19: error: cannot find symbol
    @Test
     ^
  symbol:   class Test
  location: class CoNLLRDFManagerFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:26: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:36: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:37: error: cannot find symbol
    @Disabled("Unimplemented test")
    ^
  symbol:   class Disabled
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:42: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:50: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:60: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFCommandLineTest.java:81: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFCommandLineTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:24: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerIT
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:25: error: cannot find symbol
    @Disabled("Not Useful")
    ^
  symbol:   class Disabled
  location: class CoNLLRDFManagerIT
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:35: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerIT
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:36: error: cannot find symbol
    @Disabled("Not Implemented")
    ^
  symbol:   class Disabled
  location: class CoNLLRDFManagerIT
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFManagerIT.java:44: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFManagerIT
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:15: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:21: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:29: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:35: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:43: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:50: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:57: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:65: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:72: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:80: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:88: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
./conll-rdf/src/test/java/org/acoli/conll/rdf/CoNLLRDFFormatterFactoryTest.java:95: error: cannot find symbol
    @Test
    ^
  symbol:   class Test
  location: class CoNLLRDFFormatterFactoryTest
100 errors
brgsk commented 2 years ago

@AlanQuille My coworker has actually fixed this. ./transform.sh:

#!/bin/bash
# transform CoNLL formats, see help note below

# NOTE: we expect necessary libraries to be provided by CoNLL-RDF, if that changes, this script may will break
# NOTE: this script is slow because it checks dependencies and performs compilations, revise for real applications

##########
# config #
##########
# adjust to your system

# set to your CoNLL-RDF home directory
CONLL_RDF=conll-rdf

# set to your java execs
JAVA=java
JAVAC=javac

##############################
# check system requirenments #
##############################

function is_installed {
    if ! whereis $1 >&/dev/null;    then
        return 1
    fi
    if whereis $1 | egrep -m 1 '^'$1'[^\n]*/' >& /dev/null; then
        return 0
    fi
    return 1
}

for req in git $JAVA $JAVAC ; do
    if ! is_installed $req; then
        echo error: did not find required shell '"'$req'"', please install it 1>&2
        exit 1
    fi
done

if ! is_installed rapper; then
    echo error: did not find required shell '"'rapper'"', please install 'raptor2-utils (http://librdf.org/raptor)' 1>&2
    exit 1
fi

########
# init #
########
# do not touch

# setup CoNLL-RDF
RUN=$CONLL_RDF/run.sh;
if [ ! -e $RUN ]; then
mkdir -p $CONLL_RDF >&/dev/null;
git clone --single-branch https://github.com/acoli-repo/conll-rdf.git $CONLL_RDF
fi;
EXTRACT=$RUN' CoNLLStreamExtractor'
UPDATE=$RUN' CoNLLRDFUpdater'
FORMAT=$RUN' CoNLLRDFFormatter'
OWL=$CONLL_RDF/owl/conll.ttl;
if [ $OSTYPE = "cygwin" ]; then
    OWL=`cygpath -wa $CONLL_RDF/owl`'\conll.ttl';
fi;
chmod u+x $RUN
chmod u+x $CONLL_RDF/compile.sh;

##################
# basic help msg #
##################
echo 'synopsis: '$0' [-help]' 1>&2;
echo '          '$0' SRC TGT [OWL]' 1>&2;
echo '  -help list all supported formats' 1>&2
echo '  SRC   source format' 1>&2;
echo '  TGT   target format' 1>&2;
echo '  OWL   CoNLL ontology, TTL format, defaults to '$OWL 1>&2;
echo 'read CoNLL data from stdin, write to stdout' 1>&2
echo 'transform from SRC format to TGT format according to OWL' 1>&2

if echo $1 | egrep . >&/dev/null; then
    ###########
    # preproc #
    ###########
    # do not touch
    $CONLL_RDF/compile.sh;

    FORMATS=$(rapper -i turtle $OWL 2>/dev/null | \
        grep '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>.*#Dialect>' | \
        sed "s/>.*//g" | sed "s/.*#//" | sort -u)

    # determines the classpath
    HOME=`echo $0 | sed -e s/'[^\/]*$'//`'.';
    cd $HOME
    HOME=`pwd -P`;
    cd - >&/dev/null;

    TGT=$HOME/bin

    mkdir $TGT >&/dev/null;

    CLASSPATH=$TGT":"`find $CONLL_RDF/lib | perl -pe 's/\n/:/g;' | sed s/':$'//`;
    if [ $OSTYPE = "cygwin" ]; then
        TGT=`cygpath -wa $HOME/bin`;
        CLASSPATH=$TGT;
        for lib in `find $CONLL_RDF/lib`; do
            CLASSPATH=$CLASSPATH';'`cygpath -wa $lib`
        done;
    fi;

    # updates CoNLL-transform files if necessary
    JAVAS=$(
        cd $HOME;
        for java in `find  . | egrep ".*\.java$"`; do
            class=`echo $java | sed -e s/'src\/'/'bin\/'/ -e s/'java$'/'class'/;`
            if [ ! -e $class ]; then
                echo $java;
            else if [ $java -nt $class ]; then
                echo $java;
                fi;
            fi;
        done;
        )

    cd $HOME
        if echo $JAVAS | grep java >/dev/null; then
            $JAVAC -d $TGT -classpath $CLASSPATH $JAVAS;
        fi;
    cd - >&/dev/null

    TRANSFORM=org/acoli/conll/transform/Transformer

    #####################
    # extended help msg #
    #####################
    # -help flag, instead of processing

    if echo $1 | grep -i '-help' >&/dev/null; then
        echo $FORMATS | wc -w | sed s/'$'/' supported SRC and TGT formats: '/ 1>&2
        for format in $FORMATS; do
            echo '  '$format 1>&2
        done;
        echo 1>&2
    fi;

    ##############
    # processing #
    ##############
    # should not be combined with -help

    # check args
    if echo $2 | egrep . >& /dev/null ; then

        # check installation
            if [ ! -e $TGT/$TRANSFORM.class ]; then
                echo 'error: compilation failed, did not find '$TRANSFORM' class in' $TGT 1>&2;
            else

        # transform
                $JAVA -Dfile.encoding=UTF8 -classpath $CLASSPATH $TRANSFORM -help -silent -version 1 $1 $2 $OWL
                #could also add  -Dlog4j.configuration=file:'src/log4j.properties' for another log4j config
            fi;
    fi;
fi;

Additionally, you have to remove conll-rdf/src/tests/ folder XD This is probably just a workaround, but it works, so it may be worth giving a try while @chiarcos et al. will be trying to fix it :) Cheers

brgsk commented 2 years ago

False alarm, something's wrong still. cat *my_data.conllu* | ./transform.sh CoNLL-U CoNLL-12 generated following script:

./run.sh CoNLLStreamExtractor # ID FORM LEMMA UPOS XPOS FEATS HEAD EDGE DEPS MISC | \
./run.sh CoNLLRDFUpdater -custom -updates PREFIX conll: <http://ufal.mff.cuni.cz/conll2009-st/task-description.html#>
INSERT { ?a conll:WORD ?b } WHERE { ?a conll:FORM ?b};
INSERT { ?a conll:POS ?b } WHERE { ?a conll:XPOS ?b}; | \
./run.sh CoNLLRDFFormatter -conll DOCUMENT_ID PART_NUMBER ID WORD POS PARSE PRED_LEMMA PRED_FRAMESET WORD_SENSE SPEAKER NER arguments COREF

... which does not work. After adjusting it to this format, it still won't work.

chiarcos commented 2 years ago

Partially fixed. Apologies. CoNLL-RDF is currently undergoing some heavy restructuring as we changed the backend, and CoNLL-Transform isn't synchronized with that yet.

One issue has been the CoNLL-RDF compile.sh script that is called. That should be fixed, so that we generate a script now

Building a script:

  $> ./transform.sh CoNLL-U CoNLL-12  > conllu2conll12.sh
  $> chmod u+x conllu2conll12.sh

Running the script

  $> cat YOUR_INPUT_FILE  | ./conllu2conll12.sh > YOUR_OUTPUT_FILE

In principle, that works now. However, the generated scripts use direct SPARQL updates, and doing that with bash currently fails (see CoNLL-RDF issue 74).