Skip to content

Support LogWeight in C and Python #233

Open
@dhdaines

Description

@dhdaines

Writing code in Rust is fun, but writing it in Python is more fun... but for many use cases (i.e. training or constructing WFSTs for language modeling) we need the log semiring which is only accessible from Rust.

Evidently to support it elsewhere requires it to be added to rustfst-ffi which implies duplicating all the classes and functions everywhere. Since log and tropical semiring are nearly the same thing this seems a bit wasteful to me!

As an aside, I wonder whether the OpenFST approach of templating everything based on the weight type is really a good idea, given that it duplicates all the object code simply to have a different implementation of a handful of simple functions, but this is typical of the C++ mentality underlying OpenFST...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions