Skip to content

Commit

Permalink
Bugfix: MedTator Schema names must match/be customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
qqndrew committed Sep 23, 2024
1 parent 03cf299 commit c78cd7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.ohnlp.medtagger</groupId>
<artifactId>medtagger</artifactId>
<version>1.0.77</version>
<version>1.0.78</version>
<description>The MedTagger biomedical information extraction pipeline</description>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -159,7 +165,7 @@ public void process(@Element Row input, OutputReceiver<String> out) {
Iterable<Row> 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");
Expand Down

0 comments on commit c78cd7f

Please sign in to comment.