Skip to content

Commit

Permalink
BioSem release 1.1.9.
Browse files Browse the repository at this point in the history
Release #30.
  • Loading branch information
khituras committed Nov 24, 2022
1 parent e756e07 commit f6a81f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion biosem-event-extractor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,5 @@
</license>
</licenses>
<url>http://www.ncbi.nlm.nih.gov/pubmed/22859502</url>
<version>1.1.8</version>
<version>1.1.9</version>
</project>
5 changes: 5 additions & 0 deletions biosem-event-extractor/src/relations/EventExtraction.java
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,11 @@ public void initSentence(String id) {
out = analyzer.analyze(id);
trg_ID = analyzer.proList.size(); // trg ID follows number of protein +1
// ;
// In case of predicted proteins that have been merged with gold genes, the 1:1 relation between the number
// of proteins and their IDs gets lost. Obtain the highest protein ID to avoid ID clashes.
OptionalInt maxGeneIdNumber = analyzer.proList.stream().map(prot -> prot.tid).mapToInt(tid -> Integer.parseInt(tid.substring(1))).max();
if (maxGeneIdNumber.isPresent())
trg_ID = maxGeneIdNumber.getAsInt() + 1;
evt_ID = 0;// reset new Event list
}

Expand Down
2 changes: 1 addition & 1 deletion biosem-event-extractor/src/utils/SentenceSplitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static List<BioSemSentence> spliter(String str) {
Chunking chunks = SENTENCE_CHUNKER.chunk(cc, 0, cc.length);
Set<Chunk> ls = chunks.chunkSet();
if (ls.size() < 1) {
System.out.println("No sentence found.");
System.out.println("No sentence found in input '" + str + "'.");
return list;
}
String sub_sen = chunks.charSequence().toString();
Expand Down

0 comments on commit f6a81f4

Please sign in to comment.