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
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
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