Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallele composition of FSTs? #1310

Open
Billy-Nie opened this issue Nov 22, 2024 · 0 comments
Open

Parallele composition of FSTs? #1310

Billy-Nie opened this issue Nov 22, 2024 · 0 comments

Comments

@Billy-Nie
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant