diff --git a/sandbox/Weighted Finite State Transducers.jl b/sandbox/Weighted Finite State Transducers.jl index f012a93b877ae78437fb23e63c35b3ce1a90dfd4..0a3a3a5017b994b350fe40c7bb754e80b56f3ca6 100644 --- a/sandbox/Weighted Finite State Transducers.jl +++ b/sandbox/Weighted Finite State Transducers.jl @@ -7,7 +7,7 @@ using InteractiveUtils # ╔═╡ e2560be8-f3f9-11ed-0754-e3e1572c751d begin using Pkg - #Pkg.activate(mktempdir()) + Pkg.activate(mktempdir()) # Register the FAST registry Pkg.Registry.add( diff --git a/src/ops.jl b/src/ops.jl index 6213b8efdc09090fe283c524d5927ad7cc9a5cc7..a671d9bc8b37d08d1f29bc88b1f5f0fcf25d8db4 100644 --- a/src/ops.jl +++ b/src/ops.jl @@ -19,7 +19,7 @@ function closure(A::AbstractWFST; plus = false) vcat(TA.V, transpose(α(A))) ) ρB = iszero(ρ(A)) && ! plus ? one(K) : ρ(A) - FST(α(A), TB, ω(A), ρB, λ(A)) + WFST(α(A), TB, ω(A), ρB, λ(A)) end """ @@ -37,7 +37,7 @@ function Base.cat(A::AbstractWFST, B::AbstractWFST) vcat(blockdiag(TA.V, TB.V), transpose(vcat(spzeros(K, nstates(B)), α(B)))), ) - FST( + WFST( vcat(α(A), ρ(A) * α(B)), TC, vcat(ω(A) * ρ(B), ω(B)), @@ -68,7 +68,7 @@ function Base.union(A::AbstractWFST, B::AbstractWFST) blockdiag(TA.V, TB.V) ) - FST(vcat(α(A), α(B)), TC, vcat(ω(A), ω(B)), ρ(A) ⊕ ρ(B), vcat(λ(A), λ(B))) + WFST(vcat(α(A), α(B)), TC, vcat(ω(A), ω(B)), ρ(A) ⊕ ρ(B), vcat(λ(A), λ(B))) end Base.union(A1::AbstractWFST{K}, AN::AbstractWFST{K}...) where K = foldl(union, AN, init = A1)