ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1734576 [2/2] - in /ctakes/sandbox/ctakes-clinical-deid/src: main/java/ main/java/org/ main/java/org/apache/ main/java/org/apache/ctakes/ main/java/org/apache/ctakes/deid/ main/resources/org/ main/resources/org/apache/ main/resources/org/a...
Date Fri, 11 Mar 2016 15:19:45 GMT
Added: ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Age.ruta
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Age.ruta?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Age.ruta (added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Age.ruta Fri
Mar 11 15:19:44 2016
@@ -0,0 +1,72 @@
+PACKAGE org.apache.ctakes.deid;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+
+(Num12 ApoInd?){-> Age} SPECIAL.ct=="-"? AgePostInd;
+AgePreInd (Num12 ApoInd?){-PARTOF(Age)-> Age}; 
+DeceasedInd W{REGEXP("from|with|of", true)} W{REGEXP("at", true)} 
+    (Num12 ApoInd?){-PARTOF(Age)-> Age};
+Num2{-PARTOF(Age)-> Age} W{REGEXP("M|F|male|female", true)} W{OR(REGEXP("with|/|h|hx|s|w|p|who|comes|admitted",
true), IS(CAP))};
+((W{REGEXP("in|by", true)} W{REGEXP("his|her", true)} W??)
+   | (W{REGEXP("lived", true)} W{REGEXP("into|to", true)} W?{REGEXP("his|her|their", true)})
+   | (W{REGEXP("who|shoe|he", true)} W{REGEXP("is", true)} W{REGEXP("now", true)}))
+    (@Num2 ApoInd){-PARTOF(Age)-> Age};
+FamilyInd W.ct=="at"? Num2{-PARTOF(Age)-> Age};
+
+((W{OR(REGEXP("MI|cancer"), AND(IS(CW), REGEXP(".{1,3}")))})
+    | (W{REGEXP("myocardial", true)} W{REGEXP("infarction", true)}))
+    W.ct=="at"? 
+    @Num2{-PARTOF(Age) -> Age};
+
+Num2{-PARTOF(Age)-> Age} W{REGEXP("st|th")} W{REGEXP("[Bb]irthday")};
+AgePreInd Num12{-PARTOF(Age)-> Age} (ANY{REGEXP(",|/|and")}  Num12{-> Age})*;
+Num12{-PARTOF(Age)-> Age} ANY{REGEXP(",|/|and")} Num12{-PARTOF(Age)-> Age} "years"
"of" "age";
+PACKAGE org.apache.ctakes.deid;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+
+(Num12 ApoInd?){-> Age} SPECIAL.ct=="-"? AgePostInd;
+AgePreInd (Num12 ApoInd?){-PARTOF(Age)-> Age}; 
+DeceasedInd W{REGEXP("from|with|of", true)} W{REGEXP("at", true)} 
+    (Num12 ApoInd?){-PARTOF(Age)-> Age};
+Num2{-PARTOF(Age)-> Age} W{REGEXP("M|F|male|female", true)} W{OR(REGEXP("with|/|h|hx|s|w|p|who|comes|admitted",
true), IS(CAP))};
+((W{REGEXP("in|by", true)} W{REGEXP("his|her", true)} W??)
+   | (W{REGEXP("lived", true)} W{REGEXP("into|to", true)} W?{REGEXP("his|her|their", true)})
+   | (W{REGEXP("who|shoe|he", true)} W{REGEXP("is", true)} W{REGEXP("now", true)}))
+    (@Num2 ApoInd){-PARTOF(Age)-> Age};
+FamilyInd W.ct=="at"? Num2{-PARTOF(Age)-> Age};
+
+((W{OR(REGEXP("MI|cancer"), AND(IS(CW), REGEXP(".{1,3}")))})
+    | (W{REGEXP("myocardial", true)} W{REGEXP("infarction", true)}))
+    W.ct=="at"? 
+    @Num2{-PARTOF(Age) -> Age};
+
+Num2{-PARTOF(Age)-> Age} W{REGEXP("st|th")} W{REGEXP("[Bb]irthday")};
+AgePreInd Num12{-PARTOF(Age)-> Age} (ANY{REGEXP(",|/|and")}  Num12{-> Age})*;
+Num12{-PARTOF(Age)-> Age} ANY{REGEXP(",|/|and")} Num12{-PARTOF(Age)-> Age} "years"
"of" "age";
+PACKAGE org.apache.ctakes.deid;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+
+(Num12 ApoInd?){-> Age} SPECIAL.ct=="-"? AgePostInd;
+AgePreInd (Num12 ApoInd?){-PARTOF(Age)-> Age}; 
+DeceasedInd W{REGEXP("from|with|of", true)} W{REGEXP("at", true)} 
+    (Num12 ApoInd?){-PARTOF(Age)-> Age};
+Num2{-PARTOF(Age)-> Age} W{REGEXP("M|F|male|female", true)} W{OR(REGEXP("with|/|h|hx|s|w|p|who|comes|admitted",
true), IS(CAP))};
+((W{REGEXP("in|by", true)} W{REGEXP("his|her", true)} W??)
+   | (W{REGEXP("lived", true)} W{REGEXP("into|to", true)} W?{REGEXP("his|her|their", true)})
+   | (W{REGEXP("who|shoe|he", true)} W{REGEXP("is", true)} W{REGEXP("now", true)}))
+    (@Num2 ApoInd){-PARTOF(Age)-> Age};
+FamilyInd W.ct=="at"? Num2{-PARTOF(Age)-> Age};
+
+((W{OR(REGEXP("MI|cancer"), AND(IS(CW), REGEXP(".{1,3}")))})
+    | (W{REGEXP("myocardial", true)} W{REGEXP("infarction", true)}))
+    W.ct=="at"? 
+    @Num2{-PARTOF(Age) -> Age};
+
+Num2{-PARTOF(Age)-> Age} W{REGEXP("st|th")} W{REGEXP("[Bb]irthday")};
+AgePreInd Num12{-PARTOF(Age)-> Age} (ANY{REGEXP(",|/|and")}  Num12{-> Age})*;
+Num12{-PARTOF(Age)-> Age} ANY{REGEXP(",|/|and")} Num12{-PARTOF(Age)-> Age} "years"
"of" "age";

Added: ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Date.ruta
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Date.ruta?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Date.ruta (added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Date.ruta Fri
Mar 11 15:19:44 2016
@@ -0,0 +1,33 @@
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+RETAINTYPE(WS);
+(Num4{-PARTOF(Date),REGEXP("19..|20..")} Dash Num2 Dash Num2){-> Date};
+(Num12{-PARTOF(Date)} Slash (Num12 Slash)? Num2{REGEXP("[123456789].")}){-> Date};
+Num4{-PARTOF(Date),REGEXP("19..|20..")-> Date};
+MonthInd{-PARTOF(Date)-> Date};
+RETAINTYPE;
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+RETAINTYPE(WS);
+(Num4{-PARTOF(Date),REGEXP("19..|20..")} Dash Num2 Dash Num2){-> Date};
+(Num12{-PARTOF(Date)} Slash (Num12 Slash)? Num2{REGEXP("[123456789].")}){-> Date};
+Num4{-PARTOF(Date),REGEXP("19..|20..")-> Date};
+MonthInd{-PARTOF(Date)-> Date};
+RETAINTYPE;
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+
+RETAINTYPE(WS);
+(Num4{-PARTOF(Date),REGEXP("19..|20..")} Dash Num2 Dash Num2){-> Date};
+(Num12{-PARTOF(Date)} Slash (Num12 Slash)? Num2{REGEXP("[123456789].")}){-> Date};
+Num4{-PARTOF(Date),REGEXP("19..|20..")-> Date};
+MonthInd{-PARTOF(Date)-> Date};
+RETAINTYPE;

Added: ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Doctor.ruta
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Doctor.ruta?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Doctor.ruta (added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Doctor.ruta Fri
Mar 11 15:19:44 2016
@@ -0,0 +1,27 @@
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.UserNameRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Doctor;
+
+MDInd W{-PARTOF(UserName)-> Doctor} (SPECIAL.ct=="/" W{-> Doctor})*;
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.UserNameRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Doctor;
+
+MDInd W{-PARTOF(UserName)-> Doctor} (SPECIAL.ct=="/" W{-> Doctor})*;
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.types.TypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.UserNameRutaTypeSystem;
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Doctor;
+
+MDInd W{-PARTOF(UserName)-> Doctor} (SPECIAL.ct=="/" W{-> Doctor})*;
\ No newline at end of file

Added: ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Phone.ruta
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Phone.ruta?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Phone.ruta (added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/main/ruta/org/apache/ctakes/deid/Phone.ruta Fri
Mar 11 15:19:44 2016
@@ -0,0 +1,45 @@
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Phone;
+
+DECLARE DashOrPeriod;
+PERIOD{-> DashOrPeriod};
+Dash{-> DashOrPeriod};
+
+PhonePreInd W?{OR(PARTOF({PERIOD, COLON}), W.ct=="#")} 
+    (
+    (LParen Num3 RParen)? Dash?
+    Num34 (DashOrPeriod Num34)+
+    ){-> Phone};
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Phone;
+
+DECLARE DashOrPeriod;
+PERIOD{-> DashOrPeriod};
+Dash{-> DashOrPeriod};
+
+PhonePreInd W?{OR(PARTOF({PERIOD, COLON}), W.ct=="#")} 
+    (
+    (LParen Num3 RParen)? Dash?
+    Num34 (DashOrPeriod Num34)+
+    ){-> Phone};
+PACKAGE org.apache.ctakes.deid;
+
+TYPESYSTEM org.apache.ctakes.deid.DictionariesRutaTypeSystem;
+
+DECLARE Phone;
+
+DECLARE DashOrPeriod;
+PERIOD{-> DashOrPeriod};
+Dash{-> DashOrPeriod};
+
+PhonePreInd W?{OR(PARTOF({PERIOD, COLON}), W.ct=="#")} 
+    (
+    (LParen Num3 RParen)? Dash?
+    Num34 (DashOrPeriod Num34)+
+    ){-> Phone};
\ No newline at end of file

Added: ctakes/sandbox/ctakes-clinical-deid/src/main/xsd/i2b2.xsd
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/main/xsd/i2b2.xsd?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/main/xsd/i2b2.xsd (added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/main/xsd/i2b2.xsd Fri Mar 11 15:19:44 2016
@@ -0,0 +1,297 @@
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="deIdi2b2">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element type="xs:string" name="TEXT"/>
+        <xs:element name="TAGS">
+          <xs:complexType>
+            <xs:choice maxOccurs="unbounded" minOccurs="0">
+              <xs:element name="DATE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="AGE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="NAME">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="LOCATION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="CONTACT">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="PROFESSION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="deIdi2b2">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element type="xs:string" name="TEXT"/>
+        <xs:element name="TAGS">
+          <xs:complexType>
+            <xs:choice maxOccurs="unbounded" minOccurs="0">
+              <xs:element name="DATE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="AGE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="NAME">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="LOCATION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="CONTACT">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="PROFESSION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="deIdi2b2">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element type="xs:string" name="TEXT"/>
+        <xs:element name="TAGS">
+          <xs:complexType>
+            <xs:choice maxOccurs="unbounded" minOccurs="0">
+              <xs:element name="DATE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="AGE">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id"/>
+                      <xs:attribute type="xs:integer" name="start"/>
+                      <xs:attribute type="xs:integer" name="end"/>
+                      <xs:attribute type="xs:string" name="text"/>
+                      <xs:attribute type="xs:string" name="TYPE"/>
+                      <xs:attribute type="xs:string" name="comment"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="NAME">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="LOCATION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="CONTACT">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="PROFESSION">
+                <xs:complexType>
+                  <xs:simpleContent>
+                    <xs:extension base="xs:string">
+                      <xs:attribute type="xs:string" name="id" use="optional"/>
+                      <xs:attribute type="xs:integer" name="start" use="optional"/>
+                      <xs:attribute type="xs:integer" name="end" use="optional"/>
+                      <xs:attribute type="xs:string" name="text" use="optional"/>
+                      <xs:attribute type="xs:string" name="TYPE" use="optional"/>
+                      <xs:attribute type="xs:string" name="comment" use="optional"/>
+                    </xs:extension>
+                  </xs:simpleContent>
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>
\ No newline at end of file

Added: ctakes/sandbox/ctakes-clinical-deid/src/test/java/org/apache/ctakes/deid/I2B2Evaluation.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-clinical-deid/src/test/java/org/apache/ctakes/deid/I2B2Evaluation.java?rev=1734576&view=auto
==============================================================================
--- ctakes/sandbox/ctakes-clinical-deid/src/test/java/org/apache/ctakes/deid/I2B2Evaluation.java
(added)
+++ ctakes/sandbox/ctakes-clinical-deid/src/test/java/org/apache/ctakes/deid/I2B2Evaluation.java
Fri Mar 11 15:19:44 2016
@@ -0,0 +1,150 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ctakes.deid;
+
+import java.io.IOException;
+
+import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
+import org.apache.uima.UIMAException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.resource.ResourceInitializationException;
+
+public class I2B2Evaluation {
+
+  public static void main(String[] args)
+          throws ResourceInitializationException, UIMAException, IOException {
+
+    SimplePipeline.runPipeline(
+            CollectionReaderFactory.createReader(I2B2DeidCollectionReader.class,
+                    I2B2DeidCollectionReader.PARAM_INPUT_DIRECTORY,
+//                    "C:/data/i2b2/2014/training-PHI-Gold-Set1/",
+                    "C:/data/i2b2/2014/PHI-test/",
+                    I2B2DeidCollectionReader.PARAM_GOLD_VIEW, "gold"),
+            AnalysisEngineFactory.createEngine("org.apache.ctakes.deid.DeidRutaAnnotator"),
+            AnalysisEngineFactory.createEngine(SimpleDeidEntityComparator.class,
+                    SimpleDeidEntityComparator.PARAM_CREATE_RUTA_EVAL_ANNOTATIONS, true),
+            AnalysisEngineFactory.createEngine(XmiWriterCasConsumerCtakes.class,
+                    XmiWriterCasConsumerCtakes.PARAM_OUTPUTDIR, "target/xmis"));
+
+  }
+
+}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ctakes.deid;
+
+import java.io.IOException;
+
+import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
+import org.apache.uima.UIMAException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.resource.ResourceInitializationException;
+
+public class I2B2Evaluation {
+
+  public static void main(String[] args)
+          throws ResourceInitializationException, UIMAException, IOException {
+
+    SimplePipeline.runPipeline(
+            CollectionReaderFactory.createReader(I2B2DeidCollectionReader.class,
+                    I2B2DeidCollectionReader.PARAM_INPUT_DIRECTORY,
+//                    "C:/data/i2b2/2014/training-PHI-Gold-Set1/",
+                    "C:/data/i2b2/2014/PHI-test/",
+                    I2B2DeidCollectionReader.PARAM_GOLD_VIEW, "gold"),
+            AnalysisEngineFactory.createEngine("org.apache.ctakes.deid.DeidRutaAnnotator"),
+            AnalysisEngineFactory.createEngine(SimpleDeidEntityComparator.class,
+                    SimpleDeidEntityComparator.PARAM_CREATE_RUTA_EVAL_ANNOTATIONS, true),
+            AnalysisEngineFactory.createEngine(XmiWriterCasConsumerCtakes.class,
+                    XmiWriterCasConsumerCtakes.PARAM_OUTPUTDIR, "target/xmis"));
+
+  }
+
+}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ctakes.deid;
+
+import java.io.IOException;
+
+import org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes;
+import org.apache.uima.UIMAException;
+import org.apache.uima.fit.factory.AnalysisEngineFactory;
+import org.apache.uima.fit.factory.CollectionReaderFactory;
+import org.apache.uima.fit.pipeline.SimplePipeline;
+import org.apache.uima.resource.ResourceInitializationException;
+
+public class I2B2Evaluation {
+
+  public static void main(String[] args)
+          throws ResourceInitializationException, UIMAException, IOException {
+
+    SimplePipeline.runPipeline(
+            CollectionReaderFactory.createReader(I2B2DeidCollectionReader.class,
+                    I2B2DeidCollectionReader.PARAM_INPUT_DIRECTORY,
+//                    "C:/data/i2b2/2014/training-PHI-Gold-Set1/",
+                    "C:/data/i2b2/2014/PHI-test/",
+                    I2B2DeidCollectionReader.PARAM_GOLD_VIEW, "gold"),
+            AnalysisEngineFactory.createEngine("org.apache.ctakes.deid.DeidRutaAnnotator"),
+            AnalysisEngineFactory.createEngine(SimpleDeidEntityComparator.class,
+                    SimpleDeidEntityComparator.PARAM_CREATE_RUTA_EVAL_ANNOTATIONS, true),
+            AnalysisEngineFactory.createEngine(XmiWriterCasConsumerCtakes.class,
+                    XmiWriterCasConsumerCtakes.PARAM_OUTPUTDIR, "target/xmis"));
+
+  }
+
+}



Mime
View raw message