Rust re-implementation of OpenFST - library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). A Python binding is also available.
According to the definition in the docs for WeaklyDivisibleSemiring, BooleanWeight (S = bool, + = |, * = &, 0 = false, 1 = true) should be weakly divisible: there are three combinations (x, y) such that x + y != 0:
x = true, y = true: in this case, we can set z = true so that true = (true | true) & true.
x = true, y = false: we can set z = true so that true = (true | false) & true.
x = false, y = true: we can set z = false so that false = (false | true) & false.
In fact, BooleanWeight is divisible because the inverse of true is true.
This PR adds an implementation of WeaklyDivisibleSemiring for BooleanWeight.
According to the definition in the docs for
WeaklyDivisibleSemiring
,BooleanWeight
(S = bool
,+ = |
,* = &
,0 = false
,1 = true
) should be weakly divisible: there are three combinations(x, y)
such thatx + y != 0
:x = true
,y = true
: in this case, we can setz = true
so thattrue = (true | true) & true
.x = true
,y = false
: we can setz = true
so thattrue = (true | false) & true
.x = false
,y = true
: we can setz = false
so thatfalse = (false | true) & false
.In fact,
BooleanWeight
is divisible because the inverse oftrue
istrue
.This PR adds an implementation of
WeaklyDivisibleSemiring
forBooleanWeight
.