title | titleSuffix | description | author | manager | ms.custom | ms.service | ms.component | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|
Quickstart: get intent - Java |
Language Understanding - Azure Cognitive Services |
In this quickstart, use an available public LUIS app to determine a user's intention from conversational text. Using Java, send the user's intention as text to the public app's HTTP prediction endpoint. At the endpoint, LUIS applies the public app's model to analyze the natural language text for meaning, determining overall intent and extracting data relevant to the app's subject domain. |
diberry |
cgronlun |
seodec18 |
cognitive-services |
language-understanding |
quickstart |
09/10/2018 |
diberry |
In this quickstart, pass utterances to a LUIS endpoint and get intent and entities back.
[!INCLUDE Quickstart introduction for endpoint]
- JDK SE (Java Development Kit, Standard Edition)
- Visual Studio Code
- Public app ID: df67dcdb-c37d-46af-88e1-8b97951ca1c2
[!INCLUDE Use authoring key for endpoint]
[!INCLUDE Use authoring key for endpoint]
[!INCLUDE Use authoring key for endpoint]
You can use Java to access the same results you saw in the browser window in the previous step.
-
Copy the following code to create a class in a file named
LuisGetRequest.java
:[!code-javaConsole app code that calls a LUIS endpoint]
-
Replace the value of the
YOUR-KEY
variable with your LUIS key. -
Compile the java program with
javac -cp ":lib/*" LuisGetRequest.java
. -
Run the application with
java -cp ":lib/*" LuisGetRequest.java
. It displays the same JSON that you saw earlier in the browser window.
[!INCLUDE Use authoring key for endpoint]
Delete the Java file.
[!div class="nextstepaction"] Add utterances