[prev] [index] [next]

Java Version

Comments on this implementation:
  • uses a StreamTokeniser to break input into words
  • class Chain holds data structures for modelling and generation
  • Chain makes use of Java Hashtable for suffix look-up
  • the keys of the Hashtable are objects of type Prefix
  • each value in the Hashtable is a Vector of suffix Strings
  • the Prefix object in Chain holds a Vector of words
  • the size of the prefix can be adjusted by chaning NPREF