morfologik.fsa.characters
Class FSABuilder

java.lang.Object
  extended by morfologik.fsa.characters.FSABuilder

public class FSABuilder
extends Object

Automaton builder that uses chars to label transitions.


Field Summary
static Comparator<CharSequence> LEXICOGRAPHIC_ORDER
          Lexicographic order of input sequences.
 
Constructor Summary
FSABuilder()
           
 
Method Summary
 void add(CharSequence current)
          Add another character sequence to this automaton.
static State build(CharSequence[] input)
          Build a minimal, deterministic automaton from a sorted list of strings.
 State complete()
          Finalize the automaton and return the root state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEXICOGRAPHIC_ORDER

public static final Comparator<CharSequence> LEXICOGRAPHIC_ORDER
Lexicographic order of input sequences.

Constructor Detail

FSABuilder

public FSABuilder()
Method Detail

add

public void add(CharSequence current)
Add another character sequence to this automaton. The sequence must be lexicographically larger or equal compared to any previous sequences added to this automaton (the input must be sorted).


complete

public State complete()
Finalize the automaton and return the root state. No more strings can be added to the builder after this call.

Returns:
Root automaton state.

build

public static State build(CharSequence[] input)
Build a minimal, deterministic automaton from a sorted list of strings.



Copyright © 2010. All Rights Reserved.