views:

65

answers:

1

Hi every one,

I have a big finite state automaton with like 50 states and each state has avg. 3-4 transitions to other states. So I don't think the "state pattern" is suitable for this. This FSM tends to be a spellchecker and morphological analyzer for some agglutinative language.

What is the best way to implement a FSA/FSM in Java or should I use an open source library. Since natural languages are not regular (have exception cases), is there a way to make this implementation flexible for such situations.

Thanks

A: 

It seems like it would be straightforward to implement this as a directed, labelled graph. Perhaps there are graph libraries for Java that would be appropriate for this too, however I have no experience with them so I will leave it to others to make specific recommendations.

Gian