protected boolean checkText(Element currentRulePart,String tokenText){
  NamedNodeMap attNodes=currentRulePart.getAttributes();
  for (int z=0; z < attNodes.getLength(); z++) {
    Node el=attNodes.item(z);
    String currentAtt=el.getNodeName();
    String currentVal=el.getNodeValue();
    if (currentAtt.equals("word")) {
      if (!currentVal.startsWith("INLIST") && !currentVal.startsWith("INFSTLIST") && !currentVal.startsWith("!INLIST")&& !currentVal.startsWith("!INFSTLIST")) {
        if (!currentVal.startsWith("!")) {
          if (!tokenText.equals(currentVal))           return false;
        }
 else {
          currentVal=currentVal.substring(1,currentVal.length());
          if (tokenText.equals(currentVal))           return false;
        }
      }
 else       return checkList(currentVal,tokenText);
    }
  }
  return true;
}

protected boolean checkText ( Element currentRulePart , String tokenText ) { NamedNodeMap attNodes = currentRulePart . getAttributes ( ) ; for ( int z = 0 ; z < attNodes . getLength ( ) ; z ++ ) { Node el = attNodes . item ( z ) ; String currentAtt = el . getNodeName ( ) ; String currentVal = el . getNodeValue ( ) ; if ( currentAtt . equals ( "word" ) ) { if ( ! currentVal . startsWith ( "INLIST" ) && ! currentVal . startsWith ( "INFSTLIST" ) && ! currentVal . startsWith ( "!INLIST" ) && ! currentVal . startsWith ( "!INFSTLIST" ) ) { if ( ! currentVal . startsWith ( "!" ) ) { if ( ! tokenText . equals ( currentVal ) ) return false ; } else { currentVal = currentVal . substring ( 1 , currentVal . length ( ) ) ; if ( tokenText . equals ( currentVal ) ) return false ; } } else return checkList ( currentVal , tokenText ) ; } } return true ; }
checks rule part with tag " text " ; there is only the " word " attribute right now : checks if text of a token is the same as the value of the word attribute in the rule
