I'm using the Python code on "Quickstart: Use the Translator Text API to translate a string using Python" to translate, but is there documentation showing how to modify this code to access a custom MT system rather than the baseline generic system?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@celery6131
Thanks for the feedback! We are currently investigating and will update you shortly.
@erhopf Hi Eric, please let me know if you are not the right person I should reach out for this suggestion, since Jann is not in the repo now. Thank you.
@Jann-Skotdal - Do you know the answer to this question? We can update docs accordingly.
@celery6131 - To use a custom MT system rather than the standard models, just add your Custom Translator category ID in the request parameters. Specifically, in the "Set the subscription key, base url, and path" section of the Python translate text quickstart, there is a line of code:
params = '&to=de&to=it'
Just append the category ID:
params = '&to=de&to=it&category=_your-category-id_'
You can find more information about the category parameter at https://docs.microsoft.com/azure/cognitive-services/translator/reference/v3-0-translate?tabs=curl#request-parameters
Thank you! That worked.
Most helpful comment
@celery6131 - To use a custom MT system rather than the standard models, just add your Custom Translator category ID in the request parameters. Specifically, in the "Set the subscription key, base url, and path" section of the Python translate text quickstart, there is a line of code:
params = '&to=de&to=it'
Just append the category ID:
params = '&to=de&to=it&category=_your-category-id_'
You can find more information about the category parameter at https://docs.microsoft.com/azure/cognitive-services/translator/reference/v3-0-translate?tabs=curl#request-parameters