OpenNMT / CTranslate2

Fast inference engine for Transformer models

Home Page:https://opennmt.net/CTranslate2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v3.24 examples/wngt2020 reply on missing header: ctranslate2/translator_pool.h

wcdr opened this issue · comments

commented

Hi,

I try to use the sample wngt2020 (v3.24/c95fd4e4f8c775e6a8248fea9f7ab313c170e8dd), unfortunately it relies on a missing header file: ctranslate2/translator_pool.h...

Where can I find these files (.h, .cpp)?
An old version will be OK, with something that compile and run, I will port the sample to the new API.

The aim is to have a C++ example that includes "sentencepiece" (and "nllb" if I have time), the example in the online documentation is a bit short.

Thanks,
WCDR

commented

The missing files seem to be present under the 2.0.0 tag:

commented

I have an example in C++ to translate from German to French (the language can be easily customized / same model).

  • NLLB-200 (external link for data)
  • SentencePieceProcessor with "vocabulary" (external link for data)
  • < 200 lines with comments...

Are you interesting bye the code?

Regards,
WCdr

== Output =============================

Source text: Berlin ist nicht nur Weltmetropole und die Hauptstadt Deutschlands, sondern auch meine Heimatstadt.

Source token: deu_Latn ▁Berlin ▁ist ▁nicht ▁nur ▁Welt met ropo le ▁und ▁die ▁Haupt stadt ▁Deuts ch lands , ▁sondern ▁auch ▁meine ▁He imat stadt .

Translate token: fra_Latn ▁Berlin ▁n ' est ▁pas ▁seulement ▁la ▁mé tr opo le ▁du ▁monde ▁et ▁la ▁capitale ▁de ▁l ' Al lemagne , ▁mais ▁aussi ▁ma ▁ville ▁nata le .

Translate: Berlin n'est pas seulement la métropole du monde et la capitale de l'Allemagne, mais aussi ma ville natale.

commented

Send me a PM, if you want the code.