After you've successfully deployed a model, you can query the deployment to classify text based on the model you assigned to the deployment.
You can query the deployment programmatically Prediction API or through the client libraries (Azure SDK).
Test deployed model
You can use Language Studio to submit the custom text classification task and visualize the results.
To test your deployed models from within the Language Studio:
Select Testing deployments from the left side menu.
Select the deployment you want to test. You can only test models that are assigned to deployments.
For multilingual projects, from the language dropdown, select the language of the text you are testing.
Select the deployment you want to query/test from the dropdown.
You can enter the text you want to submit to the request or upload a .txt file to use.
Select Run the test from the top menu.
In the Result tab, you can see the extracted entities from your text and their types. You can also view the JSON response under the JSON tab.
After the deployment job is completed successfully, select the deployment you want to use and from the top menu select Get prediction URL.
In the window that appears, under the Submit pivot, copy the sample request URL and body. Replace the placeholder values such as YOUR_DOCUMENT_HERE and YOUR_DOCUMENT_LANGUAGE_HERE with the actual text and language you want to process.
Submit the POST cURL request in your terminal or command prompt. You'll receive a 202 response with the API results if the request was successful.
In the response header you receive extract {JOB-ID} from operation-location, which has the format: {ENDPOINT}/language/analyze-text/jobs/<JOB-ID}>
Back to Language Studio; select Retrieve pivot from the same window you got the example request you got earlier and copy the sample request into a text editor.
Add your job ID after /jobs/ to the URL, using the ID you extracted from the previous step.
Submit the GET cURL request in your terminal or command prompt.
First you need to get your resource key and endpoint:
Go to your resource overview page in the Azure portal
From the menu on the left side, select Keys and Endpoint. You'll use the endpoint and key for the API requests
Submit a custom text classification task
Use this POST request to start a text classification task.
The version of the API you are calling. The value referenced here is for the latest version released. See Model lifecycle to learn more about other available API versions.
A string specifying the language code for the document. If this key isn't specified, the service will assume the default language of the project that was selected during project creation. See language support for a list of supported language codes.
en-us
text
{DOC-TEXT}
Document task to run the tasks on.
Lorem ipsum dolor sit amet
tasks
List of tasks we want to perform.
[]
taskName
CustomMultiLabelClassification
The task name
CustomMultiLabelClassification
parameters
List of parameters to pass to the task.
project-name
{PROJECT-NAME}
The name for your project. This value is case-sensitive.
myProject
deployment-name
{DEPLOYMENT-NAME}
The name of your deployment. This value is case-sensitive.
A string specifying the language code for the document. If this key isn't specified, the service will assume the default language of the project that was selected during project creation. See language support for a list of supported language codes.
en-us
text
{DOC-TEXT}
Document task to run the tasks on.
Lorem ipsum dolor sit amet
taskName
CustomSingleLabelClassification
The task name
CustomSingleLabelClassification
tasks
[]
Array of tasks we want to perform.
[]
parameters
List of parameters to pass to the task.
project-name
{PROJECT-NAME}
The name for your project. This value is case-sensitive.
myProject
deployment-name
{DEPLOYMENT-NAME}
The name of your deployment. This value is case-sensitive.
prod
Response
You will receive a 202 response indicating success. In the response headers, extract operation-location.
operation-location is formatted like this: