AnnotationOrthography.java
01 package gate.creole.orthomatcher;
02 
03 import java.io.IOException;
04 import java.util.ArrayList;
05 import java.util.HashMap;
06 import java.util.HashSet;
07 import java.util.List;
08 import java.util.Map;
09 
10 import gate.Annotation;
11 import gate.AnnotationSet;
12 import gate.Document;
13 import gate.creole.ExecutionException;
14 
15 /*
16  * This interface is used so that one can create an orthography class that that defines the behavior of the orthomatcher. 
17 
18  */
19 public interface AnnotationOrthography {
20   
21     /**
22      * Returns normalized content of an annotation - removes extra white spaces.
23      @param a
24      @param d
25      @return
26      @throws ExecutionException
27      */
28     public String getStringForAnnotation(Annotation a, gate.Document dthrows ExecutionException;
29     public boolean fuzzyMatch (String s1, String s2);
30     public boolean allNonStopTokensInOtherAnnot(ArrayList<Annotation> firstName,ArrayList<Annotation> secondName,String TOKEN_STRING_FEATURE_NAME,boolean caseSensitive);
31     
32     public String stripPersonTitle (String annotString, Annotation annot, Document doc, Map<Integer, List<Annotation>> tokensMap, HashMap normalizedTokensMap,AnnotationSet nameAllAnnotsthrows ExecutionException;
33     public boolean matchedAlready(Annotation annot1, Annotation annot2,List matchesDocFeature,AnnotationSet nameAllAnnots);
34     public Annotation updateMatches(Annotation newAnnot, String annotString,HashMap processedAnnots,AnnotationSet nameAllAnnots,List matchesDocFeature);
35     public void updateMatches(Annotation newAnnot, Annotation prevAnnot,List matchesDocFeature,AnnotationSet nameAllAnnots);
36     public HashSet buildTables(AnnotationSet nameAllAnnots);
37     public boolean isUnknownGender(String gender);
38 
39 }