org.cogroo.tools.checker.rules.dictionary
Interface CogrooTagDictionary

All Known Implementing Classes:
TagDictionary

public interface CogrooTagDictionary

Provides a way of determining which tags are valid for a particular word based on a tag dictionary read from a file.

Author:
William Colen

Method Summary
 boolean exists(String word, boolean cs)
           
 String[] getInflectedPrimitive(String primitive, TagMask tagMask, boolean cs)
          Given a lexeme, returns its inflected form as determined by the tagMask.
 String[] getPrimitive(String lexeme, MorphologicalTag morphologicalTag, boolean cs)
          Given a lexeme and its morphological tag, returns the possible primitives of the lexeme or an array with an empty string, if none is found.
 String[] getPrimitive(String lexeme, TagMask tagMask, boolean cs)
          Given a lexeme and its inflected form as determined by the tagMask, returns its primitive.
 TagInterpreter getTagInterpreter()
           
 MorphologicalTag[] getTags(String word)
          Returns a list of valid tags for the specified word.
 MorphologicalTag[] getTags(String word, boolean cs)
          Returns a list of valid tags for the specified word.
 boolean match(String lexeme, TagMask tagMask, boolean cs)
          Tells if a lexeme inflected as determined by the tagMask, exists in the dictionary.
 

Method Detail

getTags

MorphologicalTag[] getTags(String word)
Returns a list of valid tags for the specified word.

Parameters:
word - The word.
caseSensitive - Specifies whether the tag dictionary is case sensitive or not.
Returns:
A list of valid tags for the specified word or null if no information is available for that word.

getTags

MorphologicalTag[] getTags(String word,
                           boolean cs)
Returns a list of valid tags for the specified word.

Parameters:
word - The word.
caseSensitive - Specifies whether the tag dictionary is case sensitive or not.
Returns:
A list of valid tags for the specified word or null if no information is available for that word.

match

boolean match(String lexeme,
              TagMask tagMask,
              boolean cs)
Tells if a lexeme inflected as determined by the tagMask, exists in the dictionary.

Parameters:
lexeme - the lexeme to be searched
tagMask - the inflection of the lexeme
cs - case sensitive?
Returns:
true if the lexeme is found, false otherwise

getInflectedPrimitive

String[] getInflectedPrimitive(String primitive,
                               TagMask tagMask,
                               boolean cs)
Given a lexeme, returns its inflected form as determined by the tagMask. Returns an array with an empty string if the inflection could not be found.

Parameters:
tokens - the lexeme to be inflected
tagMask - the tag mask will determine the inflection
cs - case sensitive?
Returns:
the inflected form of the lexeme

getPrimitive

String[] getPrimitive(String lexeme,
                      TagMask tagMask,
                      boolean cs)
Given a lexeme and its inflected form as determined by the tagMask, returns its primitive.

Parameters:
lexeme - the lexeme of which the primitive will be searched
tagMask - the mask that represents the inflection of the lexeme
cs - case sensitive?
Returns:
the primitive of the lexeme

getPrimitive

String[] getPrimitive(String lexeme,
                      MorphologicalTag morphologicalTag,
                      boolean cs)
Given a lexeme and its morphological tag, returns the possible primitives of the lexeme or an array with an empty string, if none is found.

Parameters:
lexeme - a lexeme
morphologicalTag - a morphological tag
cs - tells whether the match of the lexeme must be case sensitive or not
Returns:
the primitives of the lexeme with the associated morphological tag or an array with an empty string as the first element if no primitive is found

exists

boolean exists(String word,
               boolean cs)

getTagInterpreter

TagInterpreter getTagInterpreter()


Copyright © 2012-2013 CoGrOO. All Rights Reserved.