Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/paper' into paper
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/org/texttechnologylab/DockerUnifiedUIMAInterface/driver/DUUIKubernetesDriver.java
#	src/test/java/EACLEvaluation.java
  • Loading branch information
abrami committed Nov 19, 2023
2 parents e7d0542 + 3651a08 commit 4a79fac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
import java.util.List;
import java.util.Map;

import static org.texttechnologylab.DockerUnifiedUIMAInterface.driver.DUUIKubernetesDriver.deleteDeployment;
import static org.texttechnologylab.DockerUnifiedUIMAInterface.driver.DUUIKubernetesDriver.deleteService;

public interface IDUUIInstantiatedPipelineComponent {
public static HttpClient _client = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_1_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,11 @@ public boolean getNextCAS(JCas empty) throws IOException, CompressorException, S
empty.setDocumentLanguage(_language);
}

// JCasUtil.select(empty, Sentence.class).size()
// for (Sentence s : JCasUtil.select(empty, Sentence.class)) {
// System.out.println(s.getCoveredText());
// }

return true;
}
public static void addFilesToConcurrentList(File folder, String ending, ConcurrentLinkedQueue<String> paths) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.apache.uima.jcas.JCas;

import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.stream.LongStream;

Expand Down Expand Up @@ -77,9 +78,15 @@ private long getSumMax() {
*/
public boolean getNextCAS(JCas empty) {

DUUICollectionReader pReader = this.readerSet.stream().filter(reader -> reader.hasNext()).findFirst().get();
pReader.getNextCas(empty);
return true;
Optional<DUUICollectionReader> readers = this.readerSet.stream().filter(reader -> reader.hasNext()).findFirst();

if (!readers.isEmpty()) {
DUUICollectionReader pReader = readers.get();
pReader.getNextCas(empty);
}

return !readers.isEmpty();

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,13 @@ public void getNextCas(JCas empty) {
String sNewOutput = sURI.replace(sBase, this.targetLocation)+this._targetEnding;
File tFile = new File(sNewOutput);
if(tFile.exists()){
if(bRepair){
tFile.delete();
}
else {
// if(bRepair){
// tFile.delete();
// }
// else {
bSkip = true;
_skipNumber.incrementAndGet();
}
// }
}
}
}
Expand Down

0 comments on commit 4a79fac

Please sign in to comment.