Skip to content

Commit

Permalink
Updated for version 0.3.0+ of mtap (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoll-umn authored Jan 10, 2020
1 parent a5ebbe8 commit d72d1d7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies {

implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
implementation group: 'edu.umn.nlpie', name: 'mtap', version: '[0.1.0, )'
implementation group: 'edu.umn.nlpie', name: 'mtap', version: '[0.3.0, )'
implementation group: 'edu.umn.biomedicus', name: 'biomedicus-tokenizer', version: '0.0.3'
implementation group: 'org.rocksdb', name: 'rocksdbjni', version: '6.0.1'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void propertyChanged(String destinationName,
}

Document done(Event event, String documentName) {
Document document = event.addDocument(documentName, sb.toString());
Document document = event.createDocument(documentName, sb.toString());
for (PropertyWatcher propertyWatcher : propertyWatchers) {
propertyWatcher.done(document);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void process(@NotNull Event event, @NotNull JsonObject params, @NotNull J
while ((code = bis.read()) != -1) {
sb.append((char) code);
}
event.addDocument(outputDocumentName, sb.toString());
event.createDocument(outputDocumentName, sb.toString());
}
} catch (IOException e) {
throw new IllegalStateException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void process(@NotNull Event event,
throw new IllegalStateException(e);
}

Document target = event.addDocument(targetDocumentName, documentBuilder.toString());
Document target = event.createDocument(targetDocumentName, documentBuilder.toString());
String sentencesIndex = (String) params.getOrDefault("sentences_index", "sentences");
target.addLabels(sentencesIndex, true, sentences);
String posTagsIndex = (String) params.getOrDefault("pos_tags_index", "pos_tags");
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def run_tests(self):
'biomedicus': ['defaultConfig.yml', 'biomedicus-all.jar']
},
install_requires=[
'mtap',
'mtap>=0.3.0',
'numpy',
'pyyaml',
'regex',
Expand Down

0 comments on commit d72d1d7

Please sign in to comment.