|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ctakes.sideeffect.util.SEUtil
public class SEUtil
Utility methods used in the project
Constructor Summary | |
---|---|
SEUtil()
|
Method Summary | |
---|---|
static int |
contains(int b1,
int e1,
int b2,
int e2)
Returns 1 if 1 contains 2 Returns 2 if 2 contains 1 Returns 0 otherwise |
static java.util.List |
getDrugsInSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return the List of drug IdentifiedAnnotation within the span |
static org.apache.uima.jcas.JCas |
getJCasViewWithDefault(org.apache.uima.cas.CAS cas,
java.lang.String name)
helper to look for plain text view for CDA processing or else use the default view. |
static int |
getNumOfWordTokensInSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
return the number of words except for "and" "or" in span |
static int |
getNumOfWordTokensInSpanExceptGivenNE(org.apache.uima.jcas.JCas jcas,
int begin,
int end,
int neType)
return the number of words in span except for "and" "or" and given NE |
static java.lang.String |
getSegmentID(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return segmentID contain the given span |
static java.lang.String |
getSegmentIDOfSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return segmentID of the sentence containing the given span |
static int |
getSentenceNumContainingGivenSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return sentenceNumber of the sentence containing the given span |
static int[] |
getSentenceSpanContainingGivenSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return sentence span containing the span (begin & end) |
static int[] |
getSentenceSpanOfGivenSentenceNum(org.apache.uima.jcas.JCas jcas,
int senNum)
Return sentence span of the given sentence number |
static java.lang.String |
getSentenceTextContainingGivenSpan(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return sentence text containing the span (begin & end) |
static boolean |
intersects(int b1,
int e1,
int b2,
int e2)
Returns true if one span intersects with the other |
static boolean |
isDrugBetween(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return true if a drug is between begin and end |
static boolean |
isInUpperCaseStringLine(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation nea)
Return true if the given NE belongs to the line consisting of a upper-cased string without " - " |
static boolean |
isPSEBetween(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return true if a sign/symptom or disease/disorder is between begin and end |
static boolean |
isSpanInSameLine(org.apache.uima.jcas.JCas jcas,
int begin,
int end)
Return true if the given offsets are in the same line |
static boolean |
isUpperCaseString(java.lang.String str)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SEUtil()
Method Detail |
---|
public static int[] getSentenceSpanContainingGivenSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static java.lang.String getSentenceTextContainingGivenSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static int[] getSentenceSpanOfGivenSentenceNum(org.apache.uima.jcas.JCas jcas, int senNum)
jcas
- senNum
-
public static java.lang.String getSegmentIDOfSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- - begin offsetend
- - end offset
public static java.lang.String getSegmentID(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static int contains(int b1, int e1, int b2, int e2)
public static boolean intersects(int b1, int e1, int b2, int e2)
public static java.util.List getDrugsInSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static int getSentenceNumContainingGivenSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static int getNumOfWordTokensInSpan(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static int getNumOfWordTokensInSpanExceptGivenNE(org.apache.uima.jcas.JCas jcas, int begin, int end, int neType)
jcas
- begin
- end
-
public static boolean isUpperCaseString(java.lang.String str)
public static boolean isInUpperCaseStringLine(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation nea)
jcas
- nea
-
public static boolean isSpanInSameLine(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static boolean isDrugBetween(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static boolean isPSEBetween(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- begin
- end
-
public static org.apache.uima.jcas.JCas getJCasViewWithDefault(org.apache.uima.cas.CAS cas, java.lang.String name) throws org.apache.uima.cas.CASException
cas
- name
-
org.apache.uima.cas.CASException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |