forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Definition for Microsoft Translation service (Azure#23231)
* Adding translator API definition (#1) * Adding translator API definition * Fixing PR comments, part 1 * Fixes and python * Add versions * fix PR comments * fix operation definition * Enable all operations and dotnet * Fixes for languages API * Double clients and new auth method * PR comment fix * Switch to custom operations * Removing the APIM client * Adding emitters * Update api-version * Updates to models * Attempt to fix the api-version * Fixing API version * Fix dictionaries. * Fix the models * Models fixes * Removing detect, fix breaksentence * Adding examples * Fixing languages endpoint * Updating generation --------- Co-authored-by: Michal Materna <[email protected]> Co-authored-by: Catalina Peralta <[email protected]> * Fix the packages names * Update model names * Move files * Switch to knowValues * Reuse transliteration text models * Migrate to TSP * Updating TS files to satisfy pipeline * Adding autorest * Adding swagger file * Adding examples * Fixing path to examples * Speel check fix * Updating name of TS exporter * Updating openapi.json * Linting, spell check fixes * Fix spelling * Test removing generators * Fixing BS example * Fixing model generation * Update examples * Prettier * Generate new openapi.json * adding azure-resource-provider-folder config * Suppress warning * Remove sdk-for-net-track2 * Changing the name of the folder as per PR comment --------- Co-authored-by: Michal Materna <[email protected]> Co-authored-by: Catalina Peralta <[email protected]>
- Loading branch information
1 parent
06dbe26
commit 9f3ae9d
Showing
31 changed files
with
3,494 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...nslation/Azure.AI.TextTranslation/examples/3.0/FindSentenceBoundaries_MaximumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"title": "Find Sentence Boundaries", | ||
"operationId": "FindSentenceBoundaries", | ||
"parameters": { | ||
"X-ClientTraceId": "svun", | ||
"language": "en", | ||
"script": "Latn", | ||
"api-version": "3.0", | ||
"requestBody": [ | ||
{ | ||
"text": "How are you? I am fine. What did you do today?" | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [ | ||
{ | ||
"sentLen": [ | ||
13, | ||
11, | ||
22 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...nslation/Azure.AI.TextTranslation/examples/3.0/FindSentenceBoundaries_MinimumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"title": "Find Sentence Boundaries", | ||
"operationId": "FindSentenceBoundaries", | ||
"parameters": { | ||
"api-version": "3.0", | ||
"requestBody": [ | ||
{ | ||
"text": "How are you? I am fine. What did you do today?" | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [ | ||
{ | ||
"detectedLanguage": { | ||
"language": "en", | ||
"score": 1.0 | ||
}, | ||
"sentLen": [ | ||
13, | ||
11, | ||
22 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...cation/translation/Azure.AI.TextTranslation/examples/3.0/GetLanguages_MaximumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"title": "Gets the set of languages currently supported by other operations of the Translator.", | ||
"operationId": "GetLanguages", | ||
"parameters": { | ||
"X-ClientTraceId": "kayfnugjec", | ||
"scope": "translation,transliteration,dictionary", | ||
"Accept-Language": "en", | ||
"If-None-Match": "fpnhruttllvc", | ||
"api-version": "3.0" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"translation": { | ||
"en": { | ||
"name": "English", | ||
"nativeName": "English", | ||
"dir": "ltr" | ||
}, | ||
"es": { | ||
"name": "Spanish", | ||
"nativeName": "Español", | ||
"dir": "ltr" | ||
} | ||
}, | ||
"transliteration": { | ||
"ar": { | ||
"name": "Arabic", | ||
"nativeName": "العربية", | ||
"scripts": [ | ||
{ | ||
"code": "Arab", | ||
"name": "Arabic", | ||
"nativeName": "العربية", | ||
"dir": "rtl", | ||
"toScripts": [ | ||
{ | ||
"code": "Latn", | ||
"name": "Latin", | ||
"nativeName": "اللاتينية", | ||
"dir": "ltr" | ||
} | ||
] | ||
}, | ||
{ | ||
"code": "Latn", | ||
"name": "Latin", | ||
"nativeName": "اللاتينية", | ||
"dir": "ltr", | ||
"toScripts": [ | ||
{ | ||
"code": "Arab", | ||
"name": "Arabic", | ||
"nativeName": "العربية", | ||
"dir": "rtl" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"dictionary": { | ||
"cs": { | ||
"name": "Czech", | ||
"nativeName": "Čeština", | ||
"dir": "ltr", | ||
"translations": [ | ||
{ | ||
"name": "English", | ||
"nativeName": "English", | ||
"dir": "ltr", | ||
"code": "en" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...cation/translation/Azure.AI.TextTranslation/examples/3.0/GetLanguages_MinimumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"title": "Gets the set of languages currently supported by other operations of the Translator.", | ||
"operationId": "GetLanguages", | ||
"parameters": { | ||
"api-version": "3.0" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": {} | ||
} | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
...slation/Azure.AI.TextTranslation/examples/3.0/LookupDictionaryEntries_MaximumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"title": "Lookup Dictionary Entries", | ||
"operationId": "LookupDictionaryEntries", | ||
"parameters": { | ||
"X-ClientTraceId": "yqst", | ||
"from": "en", | ||
"to": "es", | ||
"api-version": "3.0", | ||
"requestBody": [ | ||
{ | ||
"text": "fly" | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [ | ||
{ | ||
"normalizedSource": "fly", | ||
"displaySource": "fly", | ||
"translations": [ | ||
{ | ||
"normalizedTarget": "volar", | ||
"displayTarget": "volar", | ||
"posTag": "VERB", | ||
"confidence": 0.4081, | ||
"prefixWord": "", | ||
"backTranslations": [ | ||
{ | ||
"normalizedText": "fly", | ||
"displayText": "fly", | ||
"numExamples": 15, | ||
"frequencyCount": 4637 | ||
}, | ||
{ | ||
"normalizedText": "flying", | ||
"displayText": "flying", | ||
"numExamples": 15, | ||
"frequencyCount": 1365 | ||
}, | ||
{ | ||
"normalizedText": "blow", | ||
"displayText": "blow", | ||
"numExamples": 15, | ||
"frequencyCount": 503 | ||
}, | ||
{ | ||
"normalizedText": "flight", | ||
"displayText": "flight", | ||
"numExamples": 15, | ||
"frequencyCount": 135 | ||
} | ||
] | ||
}, | ||
{ | ||
"normalizedTarget": "mosca", | ||
"displayTarget": "mosca", | ||
"posTag": "NOUN", | ||
"confidence": 0.2668, | ||
"prefixWord": "", | ||
"backTranslations": [ | ||
{ | ||
"normalizedText": "fly", | ||
"displayText": "fly", | ||
"numExamples": 15, | ||
"frequencyCount": 1697 | ||
}, | ||
{ | ||
"normalizedText": "flyweight", | ||
"displayText": "flyweight", | ||
"numExamples": 0, | ||
"frequencyCount": 48 | ||
}, | ||
{ | ||
"normalizedText": "flies", | ||
"displayText": "flies", | ||
"numExamples": 9, | ||
"frequencyCount": 34 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
...slation/Azure.AI.TextTranslation/examples/3.0/LookupDictionaryEntries_MinimumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"title": "Lookup Dictionary Entries", | ||
"operationId": "LookupDictionaryEntries", | ||
"parameters": { | ||
"from": "en", | ||
"to": "es", | ||
"api-version": "3.0", | ||
"requestBody": [ | ||
{ | ||
"text": "fly" | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [ | ||
{ | ||
"normalizedSource": "fly", | ||
"displaySource": "fly", | ||
"translations": [ | ||
{ | ||
"normalizedTarget": "volar", | ||
"displayTarget": "volar", | ||
"posTag": "VERB", | ||
"confidence": 0.4081, | ||
"prefixWord": "", | ||
"backTranslations": [ | ||
{ | ||
"normalizedText": "fly", | ||
"displayText": "fly", | ||
"numExamples": 15, | ||
"frequencyCount": 4637 | ||
}, | ||
{ | ||
"normalizedText": "flying", | ||
"displayText": "flying", | ||
"numExamples": 15, | ||
"frequencyCount": 1365 | ||
}, | ||
{ | ||
"normalizedText": "blow", | ||
"displayText": "blow", | ||
"numExamples": 15, | ||
"frequencyCount": 503 | ||
}, | ||
{ | ||
"normalizedText": "flight", | ||
"displayText": "flight", | ||
"numExamples": 15, | ||
"frequencyCount": 135 | ||
} | ||
] | ||
}, | ||
{ | ||
"normalizedTarget": "mosca", | ||
"displayTarget": "mosca", | ||
"posTag": "NOUN", | ||
"confidence": 0.2668, | ||
"prefixWord": "", | ||
"backTranslations": [ | ||
{ | ||
"normalizedText": "fly", | ||
"displayText": "fly", | ||
"numExamples": 15, | ||
"frequencyCount": 1697 | ||
}, | ||
{ | ||
"normalizedText": "flyweight", | ||
"displayText": "flyweight", | ||
"numExamples": 0, | ||
"frequencyCount": 48 | ||
}, | ||
{ | ||
"normalizedText": "flies", | ||
"displayText": "flies", | ||
"numExamples": 9, | ||
"frequencyCount": 34 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...lation/Azure.AI.TextTranslation/examples/3.0/LookupDictionaryExamples_MaximumSet_Gen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"title": "Lookup Dictionary Examples", | ||
"operationId": "LookupDictionaryExamples", | ||
"parameters": { | ||
"X-ClientTraceId": "vykwwekvcncclrmsyjhbok", | ||
"from": "en", | ||
"to": "es", | ||
"api-version": "3.0", | ||
"requestBody": [ | ||
{ | ||
"text": "fly", | ||
"translation": "volar" | ||
} | ||
] | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": [ | ||
{ | ||
"normalizedSource": "fly", | ||
"normalizedTarget": "volar", | ||
"examples": [ | ||
{ | ||
"sourcePrefix": "They need machines to ", | ||
"sourceTerm": "fly", | ||
"sourceSuffix": ".", | ||
"targetPrefix": "Necesitan máquinas para ", | ||
"targetTerm": "volar", | ||
"targetSuffix": "." | ||
}, | ||
{ | ||
"sourcePrefix": "That should really ", | ||
"sourceTerm": "fly", | ||
"sourceSuffix": ".", | ||
"targetPrefix": "Eso realmente debe ", | ||
"targetTerm": "volar", | ||
"targetSuffix": "." | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.