I already added this code but i think the problem is here:

List<TextRulerSlotPattern> patterns = rule.getPatterns();
        for (TextRulerSlotPattern eachPattern : patterns) {
          for (TextRulerRuleItem item : eachPattern.fillerPattern) {
            if (item instanceof WhiskRuleItem) {
              WhiskRuleItem wri = (WhiskRuleItem) item;
              WhiskRule proposedRule = rule;
              TextRulerWordConstraint wordConstraint =
wri.getWordConstraint();
              for (String eachFeature : consideredFeatures) {
                if (wordConstraint != null) {
                 * Map<String, String> featureMap =
wordConstraint.getTokenAnnotation().getFeatureMap();*
                  String stringValue = featureMap.get(eachFeature);
                  if (stringValue != null &&
!wri.getActivatedFeatures().contains(eachFeature)) {
                    wri.activateFeature(eachFeature);
                    WhiskRule proposedRuleF = proposedRule.copy();
                    wri.deactivateFeature(eachFeature);
                    proposedRuleF.setNeedsCompile(true);
                    if (!rulesToTest.contains(proposedRuleF)) {
                      rulesToTest.add(proposedRuleF);
                    }
                  }
                }
              }

this featureMap is always empty.

Best,
Sondes

Reply via email to