This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
Translate document in batch with Cognitive services
- Batch translate pdf document from one language to another
- The below architecture shows how to do batch document translations
- Here i have translationinput as input container for document
- Then i created translationoutput as output container to store the output
- For both create SAS key with Read and write.
- At least read for translationinput
- Write for translationoutput
- Create a new logic app
- Create a new workload
- create a new connection for blob storage where you have the data
- to trigger the flow start when a file is uploaded
- i am reading the pdf file — this step is not necessary
- Now drag HTTP to send the translation request
- Provide Ocp-Apim-Subscription-Key key which is from cognitive services
- then provide the URL
- Next configure the input and outputs
- Here i am converting to 2 different languages
- source and targets are full blob sas keys
- the above SAS keys are fake and just for sample
- Next wait for 30 seconds
- Now lets get the status
- From the above batch submission, response header will have the URL to query for status
- Make sure send the Ocp-Apim-Subscription-Key
- Now save and run the logic app.
- Once successful then go out storage explorer and see the translationoutput container for processed pdf file.