quadrama / DramaNLP

UIMA NLP components for dramatic texts
Apache License 2.0
9 stars 3 forks source link

Error while "make run-scripts" #57

Closed fabianschan closed 6 years ago

fabianschan commented 6 years ago
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at de.unistuttgart.ims.uimautil.AnnotationUtil.trim(AnnotationUtil.java:61)
    at de.unistuttgart.ims.uimautil.AnnotationUtil.trim(AnnotationUtil.java:111)
    at de.unistuttgart.quadrama.io.tei.CoreTeiReader.getNext(CoreTeiReader.java:102)
    at de.unistuttgart.quadrama.io.core.AbstractDramaUrlReader.getNext(AbstractDramaUrlReader.java:163)
    at org.apache.uima.fit.component.JCasCollectionReader_ImplBase.getNext(JCasCollectionReader_ImplBase.java:74)
    at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:149)
    at de.unistuttgart.ims.drama.main.TEI2XMI.main(TEI2XMI.java:96)
make: *** [run-scripts] Error 1
pagelj commented 6 years ago

What was the branch and version that you were running this on?

fabianschan commented 6 years ago

I think version 4.0 or 1.0 (?):

`<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
    <parent>
            <groupId>de.unistuttgart.ims</groupId>
            <artifactId>de.unistuttgart.ims.drama</artifactId>
            <version>1.0.0</version>
    </parent>

`

I tried to run it with 771 XML-files and after two, it crashes.

fabianschan commented 6 years ago

Ran it on /DramaNLP/de.unistuttgart.ims.drama.main$ and made and own make command:

run-scripts:
        java -cp target/assembly/drama.Main.jar ${TEI2XMI} --input ~/scripts/data/ --csvOutput ~/scripts/csv/  --collectionId "scripts" --language "en" --corpus CORETEI
nilsreiter commented 6 years ago

@fabsurd Did you check out the code from GitHub and compiled it yourself? Or did I sent you a packaged version?

fabianschan commented 6 years ago

@nilsreiter I think I cloned it from this github, but we compiled it together in your office

nilsreiter commented 6 years ago

@fabsurd Can you go in the DramaNLP directory in the Terminal and enter git log -n 1 and copy the output? That way I know which version you're using.

fabianschan commented 6 years ago

@nilsreiter sure!

commit 697dffd318d78a3ffa6180d73be8cc4434c7becc
Merge: b9dcdd0 887ff9d
Author: Nils Reiter <nils.reiter@ims.uni-stuttgart.de>
Date:   Mon Mar 26 15:11:14 2018 +0200

Release 1.0
nilsreiter commented 6 years ago

Fixed in 1.0.1.

@fabsurd

  1. Enter the DramaNLP top level directory in the terminal
  2. Run git pull
  3. Run mvn clean compile (takes a while, but if it worked before, it should work again)
nilsreiter commented 6 years ago

(if it works now, we can close this issue)

fabianschan commented 6 years ago

@nilsreiter

pulling and compiling worked. Now i get this Error right after i start "run-scripts":

fabian@Fabians-MacBook-Pro:~/scripts/DramaNLP/de.unistuttgart.ims.drama.main$ make run-scripts
java -cp target/assembly/drama.Main.jar "de.unistuttgart.ims.drama.main.TEI2XMI" --input ~/scripts/data/ --csvOutput ~/scripts/csv/  --collectionId "scripts" --language "en" --corpus CORETEI
Error: Could not find or load main class de.unistuttgart.ims.drama.main.TEI2XMI
make: *** [run-scripts] Error 1
pagelj commented 6 years ago

Did you also compile the main files? If not you can follow step 4 in the readme on https://github.com/quadrama/DramaNLP/blob/master/README.md

fabianschan commented 6 years ago

@pagelj @nilsreiter seems to work now - thanks!

nilsreiter commented 6 years ago

Cool, thanks @pagelj