Skip to content

Commit

Permalink
Merge and conflict-resolve v2.6 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
khituras committed Dec 18, 2022
2 parents 07a4fdb + d7c28d8 commit 30964ec
Show file tree
Hide file tree
Showing 114 changed files with 2,432 additions and 1,226 deletions.
2 changes: 1 addition & 1 deletion jcore-banner-ae-biomedical-english/component.meta
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maven-artifact": {
"artifactId": "jcore-banner-ae-biomedical-english",
"groupId": "de.julielab",
"version": "2.5.1"
"version": "2.6.0"
},
"name": "JCoRe BANNER AE for Biomedical English"
}
79 changes: 43 additions & 36 deletions jcore-banner-ae-biomedical-english/pom.xml
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<artifactId>jcore-banner-ae-biomedical-english</artifactId>
<packaging>jar</packaging>
<name>JCoRe BANNER AE for Biomedical English</name>
<description>The JCoRe BANNER Gene Tagger wrapper with a model for biomedical english.</description>
<parent>
<groupId>de.julielab</groupId>
<artifactId>jcore-projects</artifactId>
<version>2.5.1</version>
</parent>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>de.julielab</groupId>
<artifactId>jcore-banner-ae</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses> <organization>
<name>JULIE Lab Jena, Germany</name>
<url>http://www.julielab.de</url>
</organization>
<modelVersion>4.0.0</modelVersion>
<artifactId>jcore-banner-ae-biomedical-english</artifactId>
<packaging>jar</packaging>
<name>JCoRe BANNER AE for Biomedical English</name>
<description>The JCoRe BANNER Gene Tagger wrapper with a model for biomedical english.</description>
<parent>
<groupId>de.julielab</groupId>
<artifactId>jcore-projects</artifactId>
<version>2.6.0</version>
</parent>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>de.julielab</groupId>
<artifactId>jcore-banner-ae</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
</dependencies>

<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses>
<organization>
<name>JULIE Lab Jena, Germany</name>
<url>http://www.julielab.de</url>
</organization>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<annotatorImplementationName>de.julielab.jcore.ae.banner.BANNERAnnotator</annotatorImplementationName>
<analysisEngineMetaData>
<name>JCoRe BANNER AE for Biomedical English</name>
<description>This component uses the BANNER named entity recognizer with a model trained on the complete (train and test) dataset of the BioCreative II gene mention challenge.</description>
<version>2.5.1</version>
<description>This component uses the BANNER named entity recognizer with a model trained on the complete (train
and test) dataset of the BioCreative II gene mention challenge.
</description>
<version>2.6.0</version>
<vendor />
<configurationParameters>
<configurationParameter>
Expand All @@ -27,6 +29,13 @@
<multiValued>true</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
<configurationParameter>
<name>ComponentId</name>
<description>Specifies the value of the 'componentId' feature for created entity annotations. Defaults to the fully qualified name of this class.</description>
<type>String</type>
<multiValued>false</multiValued>
<mandatory>false</mandatory>
</configurationParameter>
</configurationParameters>
<configurationParameterSettings>
<nameValuePair>
Expand All @@ -43,12 +52,19 @@
</array>
</value>
</nameValuePair>
<nameValuePair>
<name>ComponentId</name>
<value>
<string>BANNERAnnotatorBC2GM</string>
</value>
</nameValuePair>
</configurationParameterSettings>
<typeSystemDescription>
<imports>
<import name="de.julielab.jcore.types.jcore-document-structure-types" />
<import name="de.julielab.jcore.types.jcore-morpho-syntax-types" />
<import name="de.julielab.jcore.types.jcore-semantics-biology-types" />
<import name="de.julielab.jcore.types.jcore-document-structure-pubmed-types" />
</imports>
</typeSystemDescription>
<typePriorities />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,44 @@
import org.apache.uima.fit.factory.JCasFactory;
import org.apache.uima.fit.util.JCasUtil;
import org.apache.uima.jcas.JCas;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class BannerAETest {
private final static Logger log = LoggerFactory.getLogger(BannerAETest.class);
@Test
public void testDescriptor() throws Exception {
// just tag a single sentence with a test model that actually used that sentence as training data.
JCas jcas = JCasFactory.createJCas("de.julielab.jcore.types.jcore-morpho-syntax-types",
"de.julielab.jcore.types.jcore-document-meta-types",
"de.julielab.jcore.types.jcore-semantics-biology-types");
// this is sentence P00055040A0000 from the test BC2GM train data in the jcore-banner-ae project
jcas.setDocumentText(
"Ten out-patients with pustulosis palmaris et plantaris were examined with direct immunofluorescence (IF) technique for deposition of fibrinogen, fibrin or its degradation products (FR-antigen) in affected and unaffected skin, together with heparin-precipitable fraction (HPF), cryoglobulin and total plasma fibrinogen in the blood.");
new Sentence(jcas, 0, jcas.getDocumentText().length()).addToIndexes();
@Test
public void testDescriptor() throws Exception {
// just tag a single sentence with a test model that actually used that sentence as training data.
JCas jcas = JCasFactory.createJCas("de.julielab.jcore.types.jcore-morpho-syntax-types",
"de.julielab.jcore.types.jcore-document-meta-types",
"de.julielab.jcore.types.jcore-semantics-biology-types",
"de.julielab.jcore.types.jcore-document-structure-pubmed-types");
// this is sentence P00055040A0000 from the test BC2GM train data in the jcore-banner-ae project
jcas.setDocumentText(
"Ten out-patients with pustulosis palmaris et plantaris were examined with direct immunofluorescence (IF) technique for deposition of fibrinogen, fibrin or its degradation products (FR-antigen) in affected and unaffected skin, together with heparin-precipitable fraction (HPF), cryoglobulin and total plasma fibrinogen in the blood.");
new Sentence(jcas, 0, jcas.getDocumentText().length()).addToIndexes();

AnalysisEngine bannerAe = null;
bannerAe= AnalysisEngineFactory.createEngine("de.julielab.jcore.ae.banner.desc.jcore-banner-ae-biomedical-english");
bannerAe.process(jcas);

// expected result from the GENE.eval.small file:
// P00055040A0000|116 125|fibrinogen
// P00055040A0000|127 132|fibrin
// P00055040A0000|158 167|FR-antigen
// P00055040A0000|243 254|cryoglobulin
// P00055040A0000|269 278|fibrinogen
// However, we ignore the offsets because the eval offsets ignore white spaces
List<Gene> geneList = new ArrayList<>(JCasUtil.select(jcas, Gene.class));
assertEquals("fibrinogen", geneList.get(0).getCoveredText());
assertEquals("fibrin", geneList.get(1).getCoveredText());
assertEquals("FR-antigen", geneList.get(2).getCoveredText());
assertEquals("cryoglobulin", geneList.get(3).getCoveredText());
assertEquals("fibrinogen", geneList.get(4).getCoveredText());

}
bannerAe = AnalysisEngineFactory.createEngine("de.julielab.jcore.ae.banner.desc.jcore-banner-ae-biomedical-english");
bannerAe.process(jcas);

// expected result from the GENE.eval.small file:
// P00055040A0000|116 125|fibrinogen
// P00055040A0000|127 132|fibrin
// P00055040A0000|158 167|FR-antigen
// P00055040A0000|243 254|cryoglobulin
// P00055040A0000|269 278|fibrinogen
// However, we ignore the offsets because the eval offsets ignore white spaces
List<Gene> geneList = new ArrayList<>(JCasUtil.select(jcas, Gene.class));
assertEquals("fibrinogen", geneList.get(0).getCoveredText());
assertEquals("fibrin", geneList.get(1).getCoveredText());
assertEquals("FR-antigen", geneList.get(2).getCoveredText());
assertEquals("cryoglobulin", geneList.get(3).getCoveredText());
assertEquals("fibrinogen", geneList.get(4).getCoveredText());

}

}
2 changes: 1 addition & 1 deletion jcore-biosem-ae-bionlp-st09/component.meta
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maven-artifact": {
"artifactId": "jcore-biosem-ae-bionlp-st09",
"groupId": "de.julielab",
"version": "2.5.1"
"version": "2.6.0"
},
"name": "JCoRe BioSem AE, BioNLP SharedTask 2009"
}
21 changes: 11 additions & 10 deletions jcore-biosem-ae-bionlp-st09/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>jcore-projects</artifactId>
<version>2.5.1</version>
<version>2.6.0</version>
</parent>

<artifactId>jcore-biosem-ae-bionlp-st09</artifactId>
Expand All @@ -17,11 +17,11 @@
<dependency>
<groupId>de.julielab</groupId>
<artifactId>jcore-biosem-ae</artifactId>
<version>2.5.0</version>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand All @@ -34,10 +34,11 @@
<version>${jcore-types-version}</version>
</dependency>
</dependencies>
<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses> <url>https://github.com/JULIELab/jcore-projects/tree/master/jcore-biosem-ae-bionlp-st09</url>
<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses>
<url>https://github.com/JULIELab/jcore-projects/tree/master/jcore-biosem-ae-bionlp-st09</url>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@
<analysisEngineMetaData>
<name>JCoRe BioSEM Event Annotator</name>
<description />
<version>2.5.1</version>
<version>2.6.0</version>
<vendor />
<configurationParameters />
<configurationParameterSettings />
<configurationParameters>
<configurationParameter>
<name>ComponentId</name>
<description>Optional. If set, the 'componentId' feature of the created annotations will be set to the value of this parameter.</description>
<type>String</type>
</configurationParameter>
</configurationParameters>
<configurationParameterSettings>
<nameValuePair>
<name>ComponentId</name>
<value>
<string>BioSemEventAnnotatorST09</string>
</value>
</nameValuePair>
</configurationParameterSettings>
<typeSystemDescription>
<imports>
<import name="de.julielab.jcore.types.jcore-semantics-biology-types" />
Expand Down Expand Up @@ -38,7 +51,7 @@
<externalResourceDependencies>
<externalResourceDependency>
<key>TrainedDB</key>
<description>The BioSem database in which triggers and event rules have been learned. New predictions are mode based on the rules in this database.</description>
<description>The BioSem database in which triggers and event rules have been learned. New predictions are made based on the rules in this database.</description>
<interfaceName>de.julielab.jcore.ae.biosem.DBUtilsProvider</interfaceName>
<optional>false</optional>
</externalResourceDependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package de.julielab.jcore.ae.biosem.bionlpst09;

import de.julielab.jcore.types.EventMention;
import de.julielab.jcore.types.Gene;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.fit.factory.AnalysisEngineFactory;
import org.apache.uima.fit.factory.JCasFactory;
import org.apache.uima.fit.util.JCasUtil;
import org.apache.uima.jcas.JCas;
import org.junit.Test;

import java.util.Collection;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class TestData {
@Test
public void testAE() throws Exception {
Expand All @@ -19,5 +25,8 @@ public void testAE() throws Exception {
Gene g2 = new Gene(jCas, 15, 19);
g2.addToIndexes();
engine.process(jCas.getCas());
Collection<EventMention> events = JCasUtil.select(jCas, EventMention.class);
assertEquals(1, events.size());
assertEquals("BioSemEventAnnotatorST09", events.iterator().next().getComponentId());
}
}
2 changes: 1 addition & 1 deletion jcore-biosem-ae-bionlp-st11/component.meta
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maven-artifact": {
"artifactId": "jcore-biosem-ae-bionlp-st11",
"groupId": "de.julielab",
"version": "2.5.1"
"version": "2.6.0"
},
"name": "JCoRe BioSem AE, BioNLP SharedTask 2011"
}
21 changes: 11 additions & 10 deletions jcore-biosem-ae-bionlp-st11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>jcore-projects</artifactId>
<version>2.5.1</version>
<version>2.6.0</version>
</parent>

<artifactId>jcore-biosem-ae-bionlp-st11</artifactId>
Expand All @@ -17,11 +17,11 @@
<dependency>
<groupId>de.julielab</groupId>
<artifactId>jcore-biosem-ae</artifactId>
<version>2.5.0</version>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand All @@ -34,10 +34,11 @@
<version>${jcore-types-version}</version>
</dependency>
</dependencies>
<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses> <url>https://github.com/JULIELab/jcore-projects/tree/master/jcore-biosem-ae-bionlp-st11</url>
<licenses>
<license>
<name>BSD-2-Clause</name>
<url>https://opensource.org/licenses/BSD-2-Clause</url>
</license>
</licenses>
<url>https://github.com/JULIELab/jcore-projects/tree/master/jcore-biosem-ae-bionlp-st11</url>
</project>
Loading

0 comments on commit 30964ec

Please sign in to comment.