CultureFoundryCA / fst-runtime

This project represents a Python package to query finite-state transducers that have been compiled to the AT&T format.
MIT License
0 stars 0 forks source link

Allow traversal to generate multiple outputs #3

Open scott-parkhill opened 3 weeks ago

scott-parkhill commented 3 weeks ago

When traversing an FST, we need to be able to handle multiple valid walks through the FST. So, when traversing it, we're going to need some sort of system that allows us to walk to an accepting state, save that output, and then continue traversal until all the possible walks have been made.

For example: index+PLURAL can go to indexes or indices, and we're going to need to output both.

Edit: we'll want to do #4 first

scott-parkhill commented 3 weeks ago

This also has to handle infinite loops. Like say you have the simple FST a+. You can then generate a, or aa, or aaa, or 10 trillion as. We have to handle this. #4 should help with this.