Package org.apache.ctakes.core.ci

Examples of org.apache.ctakes.core.ci.TextModification


     */
    private void applyTextModifier(String text, StringBuffer sb) throws Exception {
        TextModification[] textModArr = tm.modify(text);
        for (int i = 0; i < textModArr.length; i++) {

          TextModification textMod = textModArr[i];
           
            if ((textMod.getOrigStartOffset() != textMod.getNewStartOffset())
                    || (textMod.getOrigEndOffset() != textMod.getNewEndOffset())) {
                logger.warn("UNSUPPORTED: TextModification with offset changes.");
            }
            else {
              sb.replace(textMod.getOrigStartOffset(),
                textMod.getOrigEndOffset(),
                textMod.getNewText());
            }
        } 
    }
View Full Code Here

TOP

Related Classes of org.apache.ctakes.core.ci.TextModification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.