Skip to content

Question regarding OpBuilder: does it allow for efficient merging/splitting of Fsts? #163

Answered by BurntSushi
bzm3r asked this question in Q&A
Discussion options

You must be logged in to vote

Does OpBuilder allow for modification of an existing Fst?

No. There are zero cases where an Fst can be mutated in place.

For example, if I have two lexicographically disjoint Fsts, can they be merged more efficiently using functionality OpBuilder builder provides, compared to simply building a new Fst from scratch?

No. OpBuilder only provides efficient implementations of some set operations on an arbitrary number of FSTs. The result of those set operations can be used to produce a new FST. Producing a new FST is done in the exact same way as you would do it by hand: you feed it a lexicographically sorted sequence of keys with corresponding values. Once the sequence is complete, the bu…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@bzm3r
Comment options

@BurntSushi
Comment options

@bzm3r
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #162 on July 31, 2023 11:09.