browsermt / bergamot-translator

Cross platform C++ library focusing on optimized machine translation on the consumer-grade device.
http://browser.mt
Mozilla Public License 2.0
327 stars 36 forks source link

Descreptions what the Bergamond AddOn do on Firefox #436

Closed theuserbl closed 2 years ago

theuserbl commented 2 years ago

I think, there is missing a description, what the Bergamond AddOn do on Firefox.

The AddOn is aved under %APPDATA%\Mozilla\Firefox\Profiles\xj4dw7ov.default-release\extensions as file firefox-translations-addon@mozilla.org.xpi

The file is a compressed zip file. But if I look input it, there is no wordlist with english, german, spain and other language words.

Someone who have a filterlist in its router sais, that the AddOn works at the beginning not correct. Only after disabling the filtering of special URLs, the translations works perfect.

I don't find any answers to this questions. So I think a description of it is needed.

jelmervdl commented 2 years ago

Hey!

This question is more applicable to https://github.com/mozilla/firefox-translations. That extension is the one you installed, and it uses bergamot-translator internally. But it ultimately controls which models to download & use, and how to use the translations. The add-on has a privacy policy but that doesn't list the specific domains.

Which internet URLs are after the installation of the AddOn needed?

The add-on downloads translation models from storage.googleapis.com. See modelRegistry.js for the urls.

The following are not essential for the plugin to function:

Which files are downloaded in the background after the normal installation?

Only the translation model files necessary for the language you selected to translate from (and optionally to, if not either from or to is English.). These files include all data necessary to do the translation, and only once you selected to translate something from/to that specific language will they be downloaded.

Where will the other downloaded files be saved?

In the default browser cache of Firefox. Go to the url about:cache in Firefox to see the path for your computer and its entries.

Where will be the wordlist / dictionary of the different languages be saved?

As mentioned, all translation model files are stored in the browser cache.

The model doesn't include a complete dictionary or anything, that's not how modern machine translation works. There is the file vocab.*.spm, which contains parts of words, or subwords if you will. A bit like syllables (but not syllables). The neural network, the file named model.*.intgemm.alphas.bin encodes indirectly how words are read and formed from those subwords.

I hope that helps!