Skip to content

Commit

Permalink
[Upd] Replace constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew-Kulich committed Feb 15, 2023
1 parent 919c856 commit e5bf9d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ protected ExecutionContext executeSelf() {
ResIterator rows = inputRDF.listResourcesWithProperty(RDF.type, inputRDF.getResource(Constants.CSVW_ROW_URI));
Map<String, List<Element>> annotatedElements = new HashMap<>();

extraction.addPrefix("ddo","http://onto.fel.cvut.cz/ontologies/application/termit/pojem/");
extraction.addPrefix("ddo", Constants.termitUri);

rows
.filterDrop(Resource::isAnon)
.forEach(row -> {
String text = row.getRequiredProperty(createProperty("WO_text")).getObject().toString();
String text = row.getRequiredProperty(createProperty(Constants.WO_TEXT)).getObject().toString();
Document doc = Jsoup.parse(StringEscapeUtils.unescapeJava(text));
annotatedElements.putAll(extraction.getTermOccurrences(doc.root()));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ private RDFa() {
public static final String WHOLE_TEXT = "whole-text";
public static final String REFERENCES_ANNOTATION = "references-annotation";
public static final String REFERENCES_TEXT = "references-text";
public static final String ANNOTATION_IN_TEXT_START = "annotation-in-text-start";
public static final String ANNOTATION_IN_TEXT_END = "annotation-in-text-end";
public static final String CSVW_ROW_URI = "http://www.w3.org/ns/csvw#Row";
public static final String WO_TEXT = "WO_text";

}

0 comments on commit e5bf9d2

Please sign in to comment.