gate.creole.orthomatcher
Class OrthoMatcherHelper

java.lang.Object
  extended by gate.creole.orthomatcher.OrthoMatcherHelper

public class OrthoMatcherHelper
extends Object


Field Summary
protected static org.apache.log4j.Logger log
           
static boolean[] rulesUsedTable
          It is used for test purposes.
 
Constructor Summary
OrthoMatcherHelper()
           
 
Method Summary
static int[] convertArrayToInteger(String[] input)
           
static boolean executeDisjunction(Map<Integer,OrthoMatcherRule> allrules, int[] executeRules, String longName, String shortName, boolean[] mr)
           
static String getStringForSpan(Long start, Long end, Document d)
          Gets the content of an annotation
static boolean initialMatch(String s1, String s2)
          Returns true if only one of s1 and s2 is a single character and the two strings match on that initial
static Double round2Places(Double input)
           
static void saveUsedTable()
          It is used for test purposes.
protected static void setMatchesPositions(AnnotationSet nameAllAnnots)
           
static String SortByStartPosition(String input)
           
static boolean straightCompare(String s1, String s2, boolean matchCase)
           
static void usedRule(int rule)
          It is used for test purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

rulesUsedTable

public static boolean[] rulesUsedTable
It is used for test purposes. This table shows which rules have fired over a corpus.

Constructor Detail

OrthoMatcherHelper

public OrthoMatcherHelper()
Method Detail

straightCompare

public static boolean straightCompare(String s1,
                                      String s2,
                                      boolean matchCase)

initialMatch

public static boolean initialMatch(String s1,
                                   String s2)
Returns true if only one of s1 and s2 is a single character and the two strings match on that initial


getStringForSpan

public static String getStringForSpan(Long start,
                                      Long end,
                                      Document d)
                               throws ExecutionException
Gets the content of an annotation

Throws:
ExecutionException

executeDisjunction

public static boolean executeDisjunction(Map<Integer,OrthoMatcherRule> allrules,
                                         int[] executeRules,
                                         String longName,
                                         String shortName,
                                         boolean[] mr)

round2Places

public static Double round2Places(Double input)

usedRule

public static void usedRule(int rule)
It is used for test purposes. It sets that a specific rule has returned 'true'.


saveUsedTable

public static void saveUsedTable()
It is used for test purposes. It saves which rules have fired(have returned 'true') while processing a corpus Must be enabled - uncommented


convertArrayToInteger

public static int[] convertArrayToInteger(String[] input)

SortByStartPosition

public static String SortByStartPosition(String input)

setMatchesPositions

protected static void setMatchesPositions(AnnotationSet nameAllAnnots)