Accessing word level predictions with Google Translate

70 Views Asked by At

There's a research project involving translation I'm thinking about, and for it, I'd like to use google's translation system. However, I need access not just to the translation of an input sentence, but the output of a beam search with probabilities at each timestep, e.g.:

input: "The cat is sitting" output (e.g. in Spanish):

t=1: el: 0.8, un: 0.1, ...: 0.1

t=2: el gato: 0.9, el felino: 0.05, un gato: 0.001 ...

t=3...

Is there any way to get ahold of this? I've tried training a model with Tensor2Tensor, but it's far worse than google's online translation and still very hard to access incremental results. Fairseq is better, but still far far worse than Google Translate.

Thanks!

Reuben

0

There are 0 best solutions below