Package org.apache.uima.ruta.textruler.core

Examples of org.apache.uima.ruta.textruler.core.TextRulerRuleItem


        // makes no sense in no
        // application!!
        resultList.add(newRule);
    } else {
      int index = currentPattern.size();
      TextRulerRuleItem baseItem = allItems.get(index);
      List<TextRulerRuleItem> itemGeneralizations = generalizeRuleItem((LP2RuleItem) baseItem);
      for (TextRulerRuleItem newItem : itemGeneralizations) {
        currentPattern.add(newItem);
        recursiveGeneralizeRule(baseRule, allItems, currentPattern, resultList);
        currentPattern.remove(currentPattern.size() - 1);
View Full Code Here


    Iterator<TextRulerRuleItem> it2 = pattern2.iterator();
    if (pattern1.size() != pattern2.size()) {
      TextRulerToolkit.log("ERROR!");
    }
    for (TextRulerRuleItem item1 : pattern1) {
      TextRulerRuleItem item2 = it2.next();
      // get all possible LGGs of the current two elements and save them
      // into the matrix
      ArrayList<TextRulerRuleItem> allLGGs = getGeneralizationsForRuleItems(item1, item2);
      generalizationTable.add(allLGGs);
      // TextRulerToolkit.log("--- GET GENERALISATIONS FOR TWO TERMS:  --"+t1+"--   --"+t2+"--");
View Full Code Here

        newMappingSequence.addAll(currentMappingSequence);
        newMappingSequence.add(lastMapping);
        resultList.add(newMappingSequence);
      } else { // otherwise we have to create all possible combinations of
        // the longer and shorter remaining pattern:
        TextRulerRuleItem firstItem = shorterPattern.get(0);
        // combine with 0, 0/1, ... 0/1/2/.../windowSize-1
        for (int maxi = 0; maxi < windowSize; maxi++) {
          RapierPatternItemMapping newMapping = new RapierPatternItemMapping();
          newMapping.shorterPattern.add(firstItem);
          for (int li = 0; li <= maxi; li++)
View Full Code Here

        // makes no sense in no
        // application!!
        resultList.add(newRule);
    } else {
      int index = currentPattern.size();
      TextRulerRuleItem baseItem = allItems.get(index);
      List<TextRulerRuleItem> itemGeneralizations = generalizeRuleItem((LP2RuleItem) baseItem);
      for (TextRulerRuleItem newItem : itemGeneralizations) {
        currentPattern.add(newItem);
        recursiveGeneralizeRule(baseRule, allItems, currentPattern, resultList);
        currentPattern.remove(currentPattern.size() - 1);
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.textruler.core.TextRulerRuleItem

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.