bergamot-translator icon indicating copy to clipboard operation
bergamot-translator copied to clipboard

Python package seems broken

Open bjesus opened this issue 1 year ago • 2 comments

I can't seem to figure out how to use the python package, and I suspect it's broken.

❯ bergamot download

❯ bergamot ls
Available models:

It never seem to find any model or to let you download any model.

bjesus avatar Apr 19 '24 16:04 bjesus

This fixes a bug with downloading: https://github.com/browsermt/bergamot-translator/pull/472

bjesus avatar Apr 19 '24 17:04 bjesus

#474 is intended to fix another bug with downloading models.

#472 works well with the default browsermt repo but it has issues with the opus repo as files are named differently there. For example the eng-fin-tiny model has the filename eng-fin.transformer-tiny11.tar.gz. So removing everything after the third . gives you eng-fin.transformer-tiny11.tar which is not the name of the extracted directory. I'm not sure if there is any one-size-fits-all solution though, if different repos follow different file naming conventions for their models. Maybe there should be a separate Repository subclass for opus which defines different name-stripping logic.

bunburya avatar Sep 07 '24 18:09 bunburya