Fst types avaliable in OpenFst

In OpenFst the command fstconvert is used to convert the fst type, either based on a stl vector container or const type. In version 1.1 a potentially very cool compact fst type was introduced.

Displaying the help by fstconvert –help displays the

Converts an FST to another type.

  Usage: fstconvert [in.fst [out.fst]]
  Flags: fst_type

  ……

  --fst_type: type = string, default = "vector"
      Output FST type

This wasn’t so helpful, so I added a quick Function to the FstRegister in include/fst/register.h

  void PrintFstNames()

  {

    for(typename map<string, Entry>::const_iterator it = fst_table_.begin(); it!=fst_table_.end(); ++it)

    {

      cout << it->first << endl;

    }

 

  }

The created a quick app to create the FstRegister  and print out the types.

 

#include <iostream>

#include <fst/main.h>

 

using namespace std;

using namespace fst;

 

 

int main()

{

        FstRegister<StdArc>* r = FstRegister<StdArc>::GetRegister();

        r->PrintFstNames();

        return 0;

}

Here are the list of the fst types for the StdArc (tropical semiring) should be the same for LogArc types. Unfortunately, no compact transducer though. The acceptor types might be useful for large language models.

compact16_acceptor
compact16_string
compact16_unweighted
compact16_unweighted_acceptor
compact16_weighted_string
compact64_acceptor
compact64_string
compact64_unweighted
compact64_unweighted_acceptor
compact64_weighted_string
compact8_acceptor
compact8_string
compact8_unweighted
compact8_unweighted_acceptor
compact8_weighted_string
compact_acceptor
compact_string
compact_unweighted
compact_unweighted_acceptor
compact_weighted_string
const
const16
const64
const8
vector

This entry was posted by Edobashira. Bookmark the permalink.

6 thoughts on “Fst types avaliable in OpenFst”

Leave a Reply

Note: only a member of this blog may post a comment.