ExampleNLP
ExampleNLP

Purpose

Demonstrates the integration of cloud-based Natural Language Processing services for comparison within a Q & A format.

How to Use

IMPORTANT

If you wish to use the ExampleNLP scene and related web services, you must update your local RIDE config file (ride.json). Please back-up any local changes to the file, including your terrain key. Next, restore your Config to default using the corresponding option in the Config debug menu at run-time, then reapply any customization and terrain key. Refer to the Config File page within Support for more information. 

Test the different types of inputs, different lengths of responses, and measure metrics as the average response time for both “hot” and “cold” services.

A service is said to be “cold” when the service requesting the NLP agent makes the very 1st request just after its initialization and deployment and the agent has not been used for a while (here leaving all the respective platform agents idle for >=5 minutes).

When the service requesting the NLP agent has already made very 1st request just after its initialization and deployment, any subsequent service request is considered “hot”.

Current Providers

  • Microsoft Azure Cognitive Service for Language
  • Amazon Lex
  • Google DialogFlow

Single Provider UI

  1. Click Cycle Providers button to cycle through currently available services.
  2. Input text in the bottom field and hit enter or click the Ask button.
  3. The side pane populates with the following information after entering a query:
    1. Response Time
    2. Text Analytics
    3. Entities
  4. If present, a custom or automatic answer will appear between the pane and input field.

Multiple Provider Comparison UI

  1. Click the Compare Providers button to toggle the comparison interface.
  2. Input text in the bottom field and hit enter or click the Ask button.
  3. Each service has its own pane which populates with the following information after entering a query:
    1. Answer
    2. Response Time
    3. Text Analytics
    4. Entities

Scene Location & Name

Assets/Ride/Examples/NLP/ExampleNLP.unity

Setup Requirements 

The ExampleNLP scene utilizes a customizable UI and interchangeable service providers through canvas, scripts and prefabs. Explore the objects in the Hierarchy view for the scene inside the Unity editor and source for Ride.NLP via the API documentation.