-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/1.5.6: Updated travis config for deployment Updated changelog 1.5.6 fix #150
- Loading branch information
Showing
5 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
os: osx | ||
osx_image: xcode9.3 | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
script: mvn package -Pquadrama -Pcreta -Drelease=release | ||
deploy: | ||
skip_cleanup: true | ||
provider: releases | ||
api_key: | ||
secure: iIB3NJmXlg0TIjqul5lpuRjF9YJf0syskDxgtdNrKTrFmRp/zXLvHBXzcYuHh+oS1DlueHChC+JRIIQx3NnP4LN9ErcgOAtQbpzl9EntCoGEtcMCd1bpwj1fLKirxxTBi9389g4dTutfIpK3nbhFU9vu6fOQVEKAle2x3g64zRIksUTWwCLTBn5UcctYEAgy+/Zi4uJwzzfEQUckDjCuaaFuIVuGfncK1n7hjtQA/omrgmHwGZ8910WHhgw4ErpKjyeooLvXcwzk/tbuvqFfbMhcqsscoaevkutfuygMCsVa4ux9y1F85QoE605zpSCYjwK4Pre/Y9rLPZ++SCuNS9gZ2wONqw69q5KJ8338hnNEGp+EXn1FwgbYvtYHxKVAFy7pF5MJaOCgWHEd8jC9miij0u21oRdcd1lc0eTATeNFXZ0BLWGmrm19Z0MrCu+7Pk1cku40tzA3cjRjLLMsZ3B8irNXIroj6AIVdkY8Md1OyDcAnxT3EGHawrPzl0+Q48FwPUCMptEBqMsgzjzN149ft3q/EAcfIO3ldFGz/4QXwfqodwHHvAWN1ctJFyH+kgrf3X5+DcH1Ce/9nZ635UYhyTrXem8c0v9yS0T5X5lsMy7As/I7r4Jr48C6278gcsmOh6ABFyaaK4fjOEXSkTpsGf+ITZPRU254/uV+/e4= | ||
file_glob: true | ||
file: | ||
- target/CorefAnnotator-*-full.jar | ||
- CorefAnnotator-*.dmg | ||
on: | ||
repo: nilsreiter/CorefAnnotator | ||
tags: true | ||
draft: true | ||
name: $TRAVIS_TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/de/unistuttgart/ims/coref/annotator/uima/UimaUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package de.unistuttgart.ims.coref.annotator.uima; | ||
|
||
import java.io.FileInputStream; | ||
import java.io.FileNotFoundException; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.zip.GZIPInputStream; | ||
|
||
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; | ||
import org.apache.uima.UIMAException; | ||
import org.apache.uima.cas.impl.XmiCasDeserializer; | ||
import org.apache.uima.fit.factory.JCasFactory; | ||
import org.apache.uima.jcas.JCas; | ||
import org.xml.sax.SAXException; | ||
|
||
public class UimaUtil { | ||
public static JCas readJCas(String filename) | ||
throws UIMAException, FileNotFoundException, SAXException, IOException { | ||
if (filename.endsWith(".gz")) { | ||
try (InputStream is = new GZIPInputStream(new FileInputStream(filename))) { | ||
return readJCas(is); | ||
} | ||
} else if (filename.endsWith(".zip")) { | ||
try (InputStream is = new ZipArchiveInputStream(new FileInputStream(filename))) { | ||
return readJCas(is); | ||
} | ||
} else { | ||
try (InputStream is = new FileInputStream(filename)) { | ||
return readJCas(is); | ||
} | ||
} | ||
} | ||
|
||
public static JCas readJCas(InputStream is) throws UIMAException, SAXException, IOException { | ||
JCas jcas = JCasFactory.createJCas(); | ||
XmiCasDeserializer.deserialize(is, jcas.getCas(), true); | ||
return jcas; | ||
} | ||
} |