org.apache.uima.annotator.dict_annot.dictionary
Interface Dictionary

All Known Implementing Classes:
HashMapDictionary

public interface Dictionary

Dictionary interface to work with a dictionary. The interface defines methods to check if a word or multi-word is available in the dictionary and to match tokens against the dictionary.


Method Summary
 boolean contains(java.lang.String word)
          Checks if the given word is available in the dictionary.
 boolean contains(java.lang.String[] multiWord)
          Checks if the given multi word is available in the dictionary.
 int getEntryCount()
          Returns the number of entries that are stored in the dictionary.
 java.lang.String getLanguage()
          Returns the language of this dictionary
 java.lang.String getTypeName()
          Returns the type name which should use to create annotations
 DictionaryMatch matchEntry(int pos, org.apache.uima.cas.text.AnnotationFS[] annotFSs, FeaturePathInfo featPathInfo)
          Checks if at the current position in the token array a match in the dictionary is found.
 

Method Detail

contains

boolean contains(java.lang.String word)
Checks if the given word is available in the dictionary.

Parameters:
word - word to look for
Returns:
returns true if the given word is available in the dictionary, otherwise false is returned

contains

boolean contains(java.lang.String[] multiWord)
Checks if the given multi word is available in the dictionary.

Parameters:
multiWord - multi word to look for
Returns:
returns true if the given multi word is available in the dictionary, otherwise false is returned

matchEntry

DictionaryMatch matchEntry(int pos,
                           org.apache.uima.cas.text.AnnotationFS[] annotFSs,
                           FeaturePathInfo featPathInfo)
Checks if at the current position in the token array a match in the dictionary is found.

Parameters:
pos - current array position
annotFSs - input annotation FS array
featPathInfo - featurePath information for the matching
Returns:
returns a DictionaryMatch object in case a match was found. If no match was found, null is returned

getEntryCount

int getEntryCount()
Returns the number of entries that are stored in the dictionary.

Returns:
number of entries

getTypeName

java.lang.String getTypeName()
Returns the type name which should use to create annotations

Returns:
type name

getLanguage

java.lang.String getLanguage()
Returns the language of this dictionary

Returns:
dictionary language


Copyright © 2011. All Rights Reserved.