Segments sent to Machine Translation even if there is a match from TM

Hello everybody

I have developed a translation provider (using Studio 2017 API) for our MT engine and almost everything works as expected...

However after running some testes we encountered a small issue: 

- Segments / translation units are sent to our MT provider plugin even if the option "Look up segments in MT even if a TM match has been found" is not ativated?
--> Translation method is set to MT:
public TranslationMethod TranslationMethod
{
get { return TranslationMethod.MachineTranslation; }
}

Are there other settings i am missing in order to make it work?

Screenshot of Studio Developers Q&A settings with a highlighted warning: 'Search for matches even if a TM match has been found'.

- And the second thing is (probably it should be like that) not only the active translation unit is sent for look up but 2 or 3 additional translation units (coming after the active one)?

 

Thanks,

Arben



Generated Image Alt-Text
[edited by: RWS Community AI at 6:13 AM (GMT 0) on 15 Nov 2024]
Parents Reply
  • Hi Arben Sabani,

    Sorry for not coming back sooner to you.

    I've investigating the issue where the translation provider is called. If you look on MT Enhanced plugin there is a form with the plugin settings:

    You need to handle in your plugin the case where you have a match from TM, and not call the provider.

    Code example from MT Enhanced:

    where: _options.ResendDrafts = the option from the UI, but you can omit this in your verification

    if (!_options.ResendDrafts && inputTu.ConfirmationLevel != ConfirmationLevel.Unspecified) //i.e. if it's status is other than untranslated
    { //don't do the lookup, b/c we don't need to pay google to translate text already translated if we edit a segment
    translation.Add(PluginResources.TranslationLookupDraftNotResentMessage);


    //later get these strings from resource file
    results.Add(CreateSearchResult(segment, translation, segment.ToString()));
    return results;
    }

    If you want to understand exactly how it works you can download the latest version for github I can tell you exactly where you need to put a break point  and see how the provider works.

    In MtTranslationProviderLanguageDirection class,  in SearchSegment method (line 117) put a break point at line 130 there we check if we have match results from TM.

     

    If you have any questions do not hesitate to ask.

    Kind regards,

    Andrea.

     

     

Children
No Data