Skip to content

Commit

Permalink
force ontology-based execution even with text input
Browse files Browse the repository at this point in the history
  • Loading branch information
Gram21 committed Oct 13, 2021
1 parent bdb339a commit 5120ff8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ tests/src/test/resources/testout/*

tests/src/test/resources/config.properties

tmp*

### ignore log files
*.log

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,14 @@ private static IText getAnnotatedText(File inputText, OntologyConnector ontoConn
}

ontologyTextProvider.addText(annotatedText, inputText.getName());
// annotatedText = ontologyTextProvider.getAnnotatedText(); //disabled for now

// the following is a workaround for the problem that text-based and ontology-based execution had
// differences
// so here we temporary save the text in ontology and reload it, forcing ontology-based execution
var tmpOwlFile = inputText.getAbsoluteFile().getParent() + File.separator + "tmp.owl";
ontoConnector.save(tmpOwlFile);
ontologyTextProvider = OntologyTextProvider.get(new OntologyConnector(tmpOwlFile));
annotatedText = ontologyTextProvider.getAnnotatedText();
} else {
try {
annotatedText = ontologyTextProvider.getAnnotatedText();
Expand Down

0 comments on commit 5120ff8

Please sign in to comment.