cmu.tawc.data
Interface Word

All Known Implementing Classes:
Word.ComboWord, Word.DashWord, Word.PlainWord, Word.RegexpWord, Word.WordStub

public interface Word


Nested Class Summary
static class Word.ComboWord
          Comes in as an array of words.
static class Word.DashWord
           
static class Word.PlainWord
           
static class Word.RegexpWord
           
static class Word.WordStub
           
 
Method Summary
 java.util.List<Category> getCategories()
          Categories that this Word is in.
 java.lang.String getWord()
          Returns a text description of the word.
 java.lang.String getWordPublicName()
           
 boolean matchesWord(java.lang.String word)
           
 boolean matchesWord(java.lang.String[] words, int index)
          Does this match a word in a sentence?
 

Method Detail

getWord

java.lang.String getWord()
Returns a text description of the word. This should only be used for the GUI or rendering.

Returns:

getWordPublicName

java.lang.String getWordPublicName()

matchesWord

boolean matchesWord(java.lang.String word)
Parameters:
text - MUST be lowercase -- to optimize case insensitivity, the sentence is assumed to be lowercase when it's passed in.
Returns:
number of times the Word matches the passed in sentence

matchesWord

boolean matchesWord(java.lang.String[] words,
                    int index)
Does this match a word in a sentence? Can match combo words, starting in one place.

Parameters:
words -
index -
Returns:

getCategories

java.util.List<Category> getCategories()
Categories that this Word is in.

Returns:
a List of Category