You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-government/documentation-government-cognitiveservices.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -624,6 +624,10 @@ For more information, please see [public documentation](../cognitive-services/Fa
624
624
### Variations
625
625
* The URI for accessing the Text Translation API in Azure Government is:
626
626
-`https://api.cognitive.microsofttranslator.us`
627
+
*[Virtual Network support](../cognitive-services/cognitive-services-virtual-networks.md) for Translator service is limited to only `US Gov Virginia` region.
- You can find your custom domain endpoint in the overview blade on the Azure portal once the resource is created.
627
631
* There are 2 regions `USGovVirginia` and `USGovArizona`
628
632
### Text Translation Method
629
633
The below example uses [Text Translation - Translate method](../cognitive-services/translator/reference/v3-0-translate.md) to translate a string of text from a language into another specified language. There are multiple [language codes](https://api.cognitive.microsofttranslator.com/languages?api-version=3.0&scope=translation) that can be used with the Text Translation API.
@@ -634,10 +638,11 @@ The sample is written in C#.
634
638
635
639
1. Create a new Console solution in Visual Studio.
636
640
2. Replace Program.cs with the corresponding code below.
637
-
3. Replace the `subscriptionKey` value with the key value that you retrieved above.
638
-
4. Replace the `region` value with the region value where you created your translator resource.
639
-
5. Replace the `text` value with text that you want to translate.
640
-
6. Run the program.
641
+
3. Replace the `endpoint` value with the URI as explained in the `Variations` section.
642
+
4. Replace the `subscriptionKey` value with the key value that you retrieved above.
643
+
5. Replace the `region` value with the region value where you created your translator resource.
644
+
6. Replace the `text` value with text that you want to translate.
645
+
7. Run the program.
641
646
642
647
You can also test out different languages and texts by replacing the "text", "from", and "to" variables in Program.cs.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/reference/v3-0-reference.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: translator-text
10
10
ms.topic: reference
11
-
ms.date: 4/2/2020
11
+
ms.date: 4/17/2020
12
12
ms.author: swmachan
13
13
---
14
14
@@ -142,7 +142,7 @@ An authentication token is valid for 10 minutes. The token should be reused when
142
142
143
143
## Virtual Network support
144
144
145
-
Translator service is now available with Virtual Network capabilities in limited regions (`WestUS2`, `EastUS`, `SouthCentralUS`, `WestUS`, `Central US EUAP`, `global`). To enable Virtual Network, please see [Configuring Azure Cognitive Services Virtual Networks](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-virtual-networks?tabs=portal).
145
+
Translator service is now available with Virtual Network capabilities in limited regions (`WestUS2`, `EastUS`, `SouthCentralUS`, `WestUS`, `CentralUSEUAP`, `global`). To enable Virtual Network, please see [Configuring Azure Cognitive Services Virtual Networks](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-virtual-networks?tabs=portal).
146
146
147
147
Once you turn on this capability, you must use the custom endpoint to call the Translator API. You cannot use the global translator endpoint ("api.cognitive.microsofttranslator.com") and you cannot authenticate with an access token.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/reference/v3-0-translate.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: translator-text
11
11
ms.topic: reference
12
-
ms.date: 03/20/2020
12
+
ms.date: 04/17/2020
13
13
ms.author: swmachan
14
14
---
15
15
@@ -450,6 +450,14 @@ The response is:
450
450
451
451
### Obtain alignment information
452
452
453
+
Alignment is returned as a string value of the following format for every word of the source. The information for each word is separated by a space, including for non-space-separated languages (scripts) like Chinese:
Example alignment string: "0:0-7:10 1:2-11:20 3:4-0:3 3:4-4:6 5:5-21:21".
458
+
459
+
In other words, the colon separates start and end index, the dash separates the languages, and space separates the words. One word may align with zero, one, or multiple words in the other language, and the aligned words may be non-contiguous. When no alignment information is available, the Alignment element will be empty. The method returns no error in that case.
460
+
453
461
To receive alignment information, specify `includeAlignment=true` on the query string.
454
462
455
463
```curl
@@ -479,9 +487,10 @@ Obtaining alignment information is an experimental feature that we have enabled
479
487
480
488
* Alignment is not available for text in HTML format i.e., textType=html
481
489
* Alignment is only returned for a subset of the language pairs:
482
-
- from English to any other language;
483
-
- from any other language to English except for Chinese Simplified, Chinese Traditional, and Latvian to English;
490
+
- English to/from any other language except Chinese Traditional, Cantonese (Traditional) or Serbian (Cyrillic).
484
491
- from Japanese to Korean or from Korean to Japanese.
492
+
- from Japanese to Chinese Simplified and Chinese Simplified to Japanese.
493
+
- from Chinese Simplified to Chinese Traditional and Chinese Traditional to Chinese Simplified.
485
494
* You will not receive alignment if the sentence is a canned translation. Example of a canned translation is "This is a test", "I love you" and other high frequency sentences.
486
495
* Alignment is not available when you apply any of the approaches to prevent translation as described [here](../prevent-translation.md)
487
496
@@ -511,7 +520,7 @@ The response is:
511
520
512
521
### Translate with dynamic dictionary
513
522
514
-
If you already know the translation you want to apply to a word or a phrase, you can supply it as markup within the request. The dynamic dictionary is only safe for compound nouns like proper names and product names.
523
+
If you already know the translation you want to apply to a word or a phrase, you can supply it as markup within the request. The dynamic dictionary is only safe for proper nouns such as personal names and product names.
0 commit comments