garvys-org / rustfst

Rust re-implementation of OpenFST - library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). A Python binding is also available.
https://docs.rs/rustfst
Other
144 stars 17 forks source link

serializable `IntegerWeight` #252

Closed mooreniemi closed 8 months ago

mooreniemi commented 8 months ago

I see that TropicalWeight has SerializableSemiring implemented, but not IntegerWeight:

impl SerializableSemiring for TropicalWeight {
    fn weight_type() -> String {
        "tropical".to_string()
    }

Purposeful? Or can I submit a PR with IntegerWeight too?

Without this fst.write doesn't work.

Garvys commented 8 months ago

Hey ! I think I implemented SeralizableSemiring only for the semirings that exist in OpenFST. So I didn't need this one for my use case. But I'm totally OK for adding it.

mooreniemi commented 8 months ago

@Garvys thanks for the merge! Can you tell me roughly when/how it becomes new crate version? Just curious when it'll be available.

Garvys commented 8 months ago

I can make one !

Garvys commented 8 months ago

I launched the 0.13.6 release. It should be available in the next 20 minutes