All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gate.creole.orthomatcher.AnnotationOrthography Maven / Gradle / Ivy

Go to download

ANNIE is a general purpose information extraction system that provides the building blocks of many other GATE applications.

There is a newer version: 9.1
Show newest version
package gate.creole.orthomatcher;

import gate.Annotation;
import gate.AnnotationSet;
import gate.Document;
import gate.creole.ExecutionException;

import java.util.List;
import java.util.Map;
import java.util.Set;

/*
 * This interface is used so that one can create an orthography class that that
 * defines the behaviour of the Orthomatcher.
 */
public interface AnnotationOrthography {
  /**
   * Returns normalized content of an annotation - removes extra white spaces.
   *
   * @throws ExecutionException
   */
  public String getStringForAnnotation(Annotation a, gate.Document d)
      throws ExecutionException;

  public boolean fuzzyMatch(String s1, String s2);

  public boolean allNonStopTokensInOtherAnnot(List firstName,
      List secondName, String TOKEN_STRING_FEATURE_NAME,
      boolean caseSensitive);

  public String stripPersonTitle(String annotString, Annotation annot,
      Document doc, Map> tokensMap,
      Map> normalizedTokensMap, AnnotationSet nameAllAnnots)
      throws ExecutionException;

  public boolean matchedAlready(Annotation annot1, Annotation annot2,
      List> matchesDocFeature, AnnotationSet nameAllAnnots);

  public Annotation updateMatches(Annotation newAnnot, String annotString,
      Map processedAnnots, AnnotationSet nameAllAnnots,
      List> matchesDocFeature);

  public void updateMatches(Annotation newAnnot, Annotation prevAnnot,
      List> matchesDocFeature, AnnotationSet nameAllAnnots);

  public Set buildTables(AnnotationSet nameAllAnnots);

  public boolean isUnknownGender(String gender);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy