Skip to content

Parallele composition of FSTs? #1310

@Chenxi-Nie

Description

@Chenxi-Nie

Dear K2 developer,

I need to do FST composition 1,000 times, right now I do this using a for loop on one single thread, like this

fsa_l = [] # create a list of 1000 FSAs
fst = # a fst to compose 
result = []
for a in range(1000):
     fsa_a = fsa_l[a]
     result.append(k2.compose(fsa_a, fst)

I tried to use create_fsa_vec to create a fsa vector and do compose using the fsa vector and the fst, but I do not think k2.compose works directly on a fsa vector.

Are there any (straight forward) way to do this? Or should I just use other python parallelization packages to do this task?

Best regards,
Chenxi

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