private void digitsToWords(WordRelation wordRelation,Item tokenItem,String tokenVal){
  FeatureSet featureSet=tokenItem.getFeatures();
  String nsw="";
  if (featureSet.isPresent("nsw")) {
    nsw=featureSet.getString("nsw");
  }
  if (nsw.equals("nide")) {
    NumberExpander.expandID(tokenVal,wordRelation,tokenItem);
  }
 else {
    String rName=featureSet.getString("name");
    String digitsType=null;
    if (tokenVal.equals(rName)) {
      digitsType=(String)cart.interpret(tokenItem);
    }
 else {
      featureSet.setString("name",tokenVal);
      digitsType=(String)cart.interpret(tokenItem);
      featureSet.setString("name",rName);
    }
    if (digitsType.equals("ordinal")) {
      NumberExpander.expandOrdinal(tokenVal,wordRelation,tokenItem);
    }
 else     if (digitsType.equals("digits")) {
      NumberExpander.expandDigits(tokenVal,wordRelation,tokenItem);
    }
 else     if (digitsType.equals("year")) {
      NumberExpander.expandID(tokenVal,wordRelation,tokenItem);
    }
 else {
      NumberExpander.expandNumber(tokenVal,wordRelation,tokenItem);
    }
  }
}

private void digitsToWords ( WordRelation wordRelation , Item tokenItem , String tokenVal ) { FeatureSet featureSet = tokenItem . getFeatures ( ) ; String nsw = "" ; if ( featureSet . isPresent ( "nsw" ) ) { nsw = featureSet . getString ( "nsw" ) ; } if ( nsw . equals ( "nide" ) ) { NumberExpander . expandID ( tokenVal , wordRelation , tokenItem ) ; } else { String rName = featureSet . getString ( "name" ) ; String digitsType = null ; if ( tokenVal . equals ( rName ) ) { digitsType = ( String ) cart . interpret ( tokenItem ) ; } else { featureSet . setString ( "name" , tokenVal ) ; digitsType = ( String ) cart . interpret ( tokenItem ) ; featureSet . setString ( "name" , rName ) ; } if ( digitsType . equals ( "ordinal" ) ) { NumberExpander . expandOrdinal ( tokenVal , wordRelation , tokenItem ) ; } else if ( digitsType . equals ( "digits" ) ) { NumberExpander . expandDigits ( tokenVal , wordRelation , tokenItem ) ; } else if ( digitsType . equals ( "year" ) ) { NumberExpander . expandID ( tokenVal , wordRelation , tokenItem ) ; } else { NumberExpander . expandNumber ( tokenVal , wordRelation , tokenItem ) ; } } }
convert the given digit token into ( word ) items in the wordrelation .
