Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear where and how this can be used in the API #5084

Closed
Paul-Dempsey opened this issue Feb 28, 2018 — with docs.microsoft.com · 5 comments
Closed

Unclear where and how this can be used in the API #5084

Paul-Dempsey opened this issue Feb 28, 2018 — with docs.microsoft.com · 5 comments

Comments

Copy link

  • Exactly where in the request do you supply this? Is this simply embedded in the source text somewhere?

  • What do you mean by "HTML mode"? Do you mean when an API request includes <ContentType>text/html</ContentType> (and maybe text/xml)?

Can you give an example using the API?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: be0a7128-2576-678c-be8e-6f26fe9c1628
  • Version Independent ID: c2575811-47ea-a584-c918-cd0a3df9189b
  • Content
  • Content Source
  • Service: cognitive-services
Copy link
Author

After re-reading several times, I think I decoded what this was trying to say is that you apply the markup to the word or phrase for which you want to provide a fixed translation. This is somewhat parallel to the mechanism for "Do not translate": <div class="notranslate">untranslatable-text</div>, which unfortunately, and inconsistently, is apparently only usable in text/html and text/xml.

@amanarneja
Copy link
Contributor

@Paul-Dempsey Thanks for the feedback! I have assigned this issue to the author who can work on making the content easier to understand.

@clayms
Copy link

clayms commented May 12, 2018

Is there any movement on this? I am using python and submitting a json in a similar way to this example.

@clayms
Copy link

clayms commented May 13, 2018

Combining the instructions here with the python examples with the following input

text = "Instant dictionary: word <mstrans:dictionary translation=\"wordomatic\">word or phrase</mstrans:dictionary> is a dictionary entry."

gives the following output:

[
    {
        "translations": [
            {
                "text": "Instant Dictionary Word wordomatic ist ein Wörterbucheintrag.",
                "to": "de"
            }
        ]
    }
]

Somehow everything before the tagged word is not translated.

However, translating text = "Instant dictionary: word" returns:
{"translations": [{"text": "Instant Dictionary: Word","to": "de"}]}

Whereas translating text = "Instant dictionary word" returns:
{"translations": [{"text": "Instant Wörterbuchwort","to": "de"}]}

What is the problem with "word" and ":" ?

How do these words and characters change the way the translation API works?

Why are these words and characters used in an example?

@tchristiani
Copy link
Contributor

#please-close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants