Giter Club home page Giter Club logo

Comments (12)

danpovey avatar danpovey commented on September 28, 2024

from k2.

csukuangfj avatar csukuangfj commented on September 28, 2024

Can it be implemented in Python?

from k2.

danpovey avatar danpovey commented on September 28, 2024

from k2.

chenguoguo avatar chenguoguo commented on September 28, 2024

from k2.

danpovey avatar danpovey commented on September 28, 2024

from k2.

csukuangfj avatar csukuangfj commented on September 28, 2024

Can we provide some command line tools similar to lhotse that convert openfst format to k2 format offline so
that we can keep the c++ code simple?

from k2.

danpovey avatar danpovey commented on September 28, 2024

from k2.

chenguoguo avatar chenguoguo commented on September 28, 2024

@danpovey double checking, for WFST

0 1 1 1 0.1
0 2 2 2 0.2
1 2 3 3 0.3
2

We would still create a super final state, because there is no arc entering the original final state with label -1, right?

Regarding the start state, is it required by K2 that there will only be one start state with state 0? If yes we may have to add a super start state as well?

from k2.

danpovey avatar danpovey commented on September 28, 2024

OK, we can require that in the text form, the final-state must be listed. However I'm not sure what to do about the empty FSA, i.e. with no states. That is actually supported by the tools as-is, but perhaps we could settle on always having at least 2 states (and just supporting an empty FSA as one not having any arcs). (?). Thinking of the pros and cons of this.

There is only one start state, this is the same as in OpenFST.

from k2.

danpovey avatar danpovey commented on September 28, 2024

... one possibility is to say that for empty FSAs, we just have no arcs, and to make it possible to represent the empty FSA in a vector of FSAs (and write to disk) we actually store the FSA on disk as 2 tensors: one being the row_splits of FSAs -> arcs, equivalent to fsa_vec.RowSplits(2)[fsa_vec.RowSplits(1)], and the 2nd being the tensor of arcs. And the equivalent in text form (although I dont recommend using text form much) would be to represent the empty FSA as just a blank line, with regular FSAs terminated by a single blank line if we serialize multiple FSAs to a single text string. Again, I'm not sure how much we'll want to serialize vectors of FSAs to text strings, i.e. whether this is needed.

from k2.

chenguoguo avatar chenguoguo commented on September 28, 2024

from k2.

danpovey avatar danpovey commented on September 28, 2024

from k2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.