Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7617391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:08:26+00:00 2026-05-31T03:08:26+00:00

Before I start, note that I’m using the linux shell (via using subprocess.call() from

  • 0

Before I start, note that I’m using the linux shell (via using subprocess.call() from Python), and I am using openFST.

I’ve been sifting through documents and questions about openFST, but I cannot seem to find an answer to this question: how does one actually give input to an openFST-defined, compiled and composed FST? Where does the output go? Do I simply execute ‘fstproject’? If so, how would I, say, give it a string to transduce, and print the various transductions when the end-state(s) have been reached?

I apologize if this question seems obvious. I’m not very familiar with openFST as of yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:08:27+00:00Added an answer on May 31, 2026 at 3:08 am

    One way is to create your machine that performs the transformation.
    A very simple example would be to upper case a string.

    M.wfst

    0 0 a A
    0 0 b B
    0 0 c C
    0
    

    The accompanying symbols file contains a line for for each symbols of the alphabet. Note 0 is reserved for null (epsilon) transitions and has special meaning in many of the operations.

    M.syms

    <epsilon> 0
    a 1
    b 2
    c 3
    A 4
    B 5
    C 6
    

    Then compile the machine

    fstcompile --isymbols=M.syms --osymbols=M.syms M.wfst > M.ofst
    

    For an input string “abc” create a linear chain automata, this is a left-to-right chain with an arc for each character. This is an acceptor so we only need a column for the
    input symbols.

    I.wfst

    0 1 a
    1 2 b
    2 3 c
    3  
    

    Compile as an acceptor

    fstcompile --isymbols=M.syms --acceptor I.wfst > I.ofst
    

    Then compose the machines and print

    fstcompose I.ofst M.ofst | fstprint --isymbols=M.syms --osymbols=M.syms 
    

    This will give the output

    0   1   a   A
    1   2   b   B
    2   3   c   C
    3
    

    The output of fstcompose is a lattice of all transductions of the input string. (In this case there is only one). If M.ofst is more complicated fstshortestpath can be used to extract n-strings using the flags –unique -nshortest=n. This output is again a transducer, you could either scrap the output of fstprint, or use C++ code and the OpenFst library to run depth first search to extract the strings.

    Inserting fstproject –project_output will convert the output to an acceptor containing only the output labels.

    fstcompose I.ofst M.ofst | fstproject --project_output |  fstprint --isymbols=M.syms --osymbols=M.syms 
    

    Gives the following

    0  1  A  A
    1  2  B  B
    2  3  C  C
    3
    

    This is an acceptor because the input and output labels are the same, the –acceptor options can be used to generate more succinct output.

     fstcompose I.ofst M.ofst | fstproject --project_output |  fstprint --isymbols=M.syms --acceptor
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using Mediainfo library in my C# project,before start invoking this dll,i just ran
Before you start flaming, I'm going to tell you that I am trying to
Overview I am using urlopen from the Python 2.7.1 urllib2 package to do a
I managed to do this on excel by using the following (note that I
Before start let me tell my experience: I am experienced with C#.NET, web services,
I want to get one record before start date and end date DtpFrom means
I usually try to do TDD with not much analysis (no diagrams) before start
I am working on a Media up-loader which uploads images to Server. Before start
Before I start, I know there is this post and it doesn't answer my
Before you start firing at me, I'm NOT looking to do this, but someone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.