From c78cd7f95d0c3fdac60ed8d15e3e17209e79d984 Mon Sep 17 00:00:00 2001 From: Andrew Wen Date: Mon, 23 Sep 2024 11:19:22 -0500 Subject: [PATCH] Bugfix: MedTator Schema names must match/be customizable --- pom.xml | 2 +- .../ohnlp/medtagger/backbone/MedtatorOutputTransform.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f65d41d..f70c783 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.ohnlp.medtagger medtagger - 1.0.77 + 1.0.78 The MedTagger biomedical information extraction pipeline diff --git a/src/main/java/org/ohnlp/medtagger/backbone/MedtatorOutputTransform.java b/src/main/java/org/ohnlp/medtagger/backbone/MedtatorOutputTransform.java index 4fb0006..253ca49 100644 --- a/src/main/java/org/ohnlp/medtagger/backbone/MedtatorOutputTransform.java +++ b/src/main/java/org/ohnlp/medtagger/backbone/MedtatorOutputTransform.java @@ -45,6 +45,12 @@ public class MedtatorOutputTransform extends LoadFromMany { ) private String workingDir; + @ConfigurationProperty( + path = "taskName", + desc = "Task Name (the Schema Definition Name for MedTator)" + ) + private String taskName; + @ConfigurationProperty( path = "note_id_raw_col", desc = "The input column to use containing the note identifier from the raw text collection" @@ -159,7 +165,7 @@ public void process(@Element Row input, OutputReceiver out) { Iterable anns = input.getRow("lhs").getIterable("annotations"); String rawText = input.getRow("rhs").getString(note_text_raw_col.getSourceColumnName()); Document doc = db.newDocument(); - org.w3c.dom.Element rootElement = doc.createElement("MedTagger"); + org.w3c.dom.Element rootElement = doc.createElement(taskName); doc.appendChild(rootElement); Node cdata = doc.createCDATASection(rawText); org.w3c.dom.Element textElement = doc.createElement("TEXT");