I have been able to train a Transformer model to perform bilingual translation successfully, achieving a BLEU over 71. In order to improve the results, I want to explore how adding linguistic features related to source words affects the translation quality and BLEU score. I have been diving into the OpenNMT-tf documentation and into this forum I have seen that I can add features such as POS tagging and so on.
My questions are the following:
- What kind of features does OpenNMT-tf support? I am planning to use Spacy to get the features since I have both source and target language models trained, so I am able to easily obtain:
- POS tagging: what is the format expected by OpenNMT?
- Morphology: for example, from the word “I” Spacy can get:
Case=Nom|Number=Sing|Person=1|PronType=Prs. Does OpenNMT support this? What is the format expected?
- Lemmatization: what is the format expected by OpenNMT? Lemmas replacing the source words?
- Name Entity Recognition: does OpenNMT support this? And, if so, what is the format expected? Some kind of “Entity type + BILUO scheme” annotation such as
Is there any kind of documentation explaining that?
As I have seen here, the way this features are added to the model is by having multiple source parallel train and validation files and provided them as inputs during inference as well. If I set my configuration file in that way, can I train the Transformer model with the command
onmt-main --model_type Transformer --config ./config/myconfig.yml train --with_evalor do I have to make some additional changes?
Btw, can I expect improving my results adding linguistic features?
Thank you so much