API reference

WitResultUtilities Class

Fields

WIT_ERROR : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_ERROR
WIT_KEY_ENTITIES : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_KEY_ENTITIES
WIT_KEY_FINAL : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_KEY_FINAL
WIT_KEY_INTENTS : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_KEY_INTENTS
WIT_KEY_TRAITS : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_KEY_TRAITS
WIT_KEY_TRANSCRIPTION : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_KEY_TRANSCRIPTION
WIT_PARTIAL_RESPONSE : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_PARTIAL_RESPONSE
WIT_RESPONSE : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_RESPONSE
WIT_STATUS_CODE : const string
Signature
const string Meta.WitAi.WitResultUtilities.WIT_STATUS_CODE

Static Methods

AsWitEntity ( witResponse )
Converts wit response node into a wit entity
Signature
static WitEntityData Meta.WitAi.WitResultUtilities.AsWitEntity(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
AsWitFloatEntity ( witResponse )
Converts wit response node into a float entity
Signature
static WitEntityFloatData Meta.WitAi.WitResultUtilities.AsWitFloatEntity(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
AsWitIntent ( witResponse )
Converts wit response node into wit intent data
Signature
static WitIntentData Meta.WitAi.WitResultUtilities.AsWitIntent(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
AsWitIntEntity ( witResponse )
Converts wit response node into an int entity
Signature
static WitEntityIntData Meta.WitAi.WitResultUtilities.AsWitIntEntity(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
EntityCount ( response )
Returns the total number of entities
Signature
static int Meta.WitAi.WitResultUtilities.EntityCount(this WitResponseNode response)
Parameters
response: this WitResponseNode
Returns
int
GetAllEntityValues ( witResponse , name )
Gets a collection of string value containing the selected value from each entity in the response.
Signature
static string [] Meta.WitAi.WitResultUtilities.GetAllEntityValues(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string
Returns
string []
GetClientUserId ( witResponse )
Gets the unique client user id if included in the response
Signature
static string Meta.WitAi.WitResultUtilities.GetClientUserId(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
Returns
string
GetCodeFromPath ( path )
Signature
static string Meta.WitAi.WitResultUtilities.GetCodeFromPath(string path)
Parameters
path: string
Returns
string
GetEntities ( witResponse , name )
Gets all entities in the given response
Signature
static WitEntityData [] Meta.WitAi.WitResultUtilities.GetEntities(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode  The root response node of an VoiceService.events.OnResponse event
name: string
Returns
WitEntityData []
GetError ( witResponse )
Returns if any errors are contained in the response
Signature
static string Meta.WitAi.WitResultUtilities.GetError(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
string
GetFinalResponse ( witResponse )
Gets the content of a witResponse["response"] node.
Signature
static WitResponseClass Meta.WitAi.WitResultUtilities.GetFinalResponse(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
GetFirstEntity ( witResponse , name )
Gets the first entity as a WitResponseNode
Signature
static WitResponseNode Meta.WitAi.WitResultUtilities.GetFirstEntity(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string
GetFirstEntityValue ( witResponse , name )
Gets the string value of the first entity
Signature
static string Meta.WitAi.WitResultUtilities.GetFirstEntityValue(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string
Returns
string
GetFirstIntent ( witResponse )
Gets the first intent node
Signature
static WitResponseNode Meta.WitAi.WitResultUtilities.GetFirstIntent(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
GetFirstIntentData ( witResponse )
Gets the first set of intent data
Signature
static WitIntentData Meta.WitAi.WitResultUtilities.GetFirstIntentData(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
WitIntentData  WitIntentData or null if no intents are found
GetFirstWitEntity ( witResponse , name )
Gets the first entity with the given name as string data
Signature
static WitEntityData Meta.WitAi.WitResultUtilities.GetFirstWitEntity(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string  The entity name typically something like name:name
GetFirstWitFloatEntity ( witResponse , name )
Gets the first entity with the given name as float data
Signature
static WitEntityFloatData Meta.WitAi.WitResultUtilities.GetFirstWitFloatEntity(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string  The entity name typically something like name:name
GetFirstWitFloatValue ( witResponse , name , defaultValue )
Gets The first entity with the given name as int data
Signature
static float Meta.WitAi.WitResultUtilities.GetFirstWitFloatValue(this WitResponseNode witResponse, string name, float defaultValue)
Parameters
witResponse: this WitResponseNode
name: string  The entity name typically something like name:name
defaultValue: float
Returns
float
GetFirstWitIntEntity ( witResponse , name )
Gets The first entity with the given name as int data
Signature
static WitEntityIntData Meta.WitAi.WitResultUtilities.GetFirstWitIntEntity(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string  The entity name typically something like name:name
GetFirstWitIntValue ( witResponse , name , defaultValue )
Gets The first entity with the given name as int data
Signature
static int Meta.WitAi.WitResultUtilities.GetFirstWitIntValue(this WitResponseNode witResponse, string name, int defaultValue)
Parameters
witResponse: this WitResponseNode
name: string  The entity name typically something like name:name
defaultValue: int
Returns
int
GetFloatEntities ( witResponse , name )
Gets all float entity values in the given response with the specified entity name
Signature
static WitEntityFloatData [] Meta.WitAi.WitResultUtilities.GetFloatEntities(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode  The root response node of an VoiceService.events.OnResponse event
name: string  The entity name typically something like name:name
GetHasTranscription ( witResponse )
Get whether this response contains a transcription that should be analyzed
Signature
static bool Meta.WitAi.WitResultUtilities.GetHasTranscription(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetIntEntities ( witResponse , name )
Gets all int entity values in the given response with the specified entity name
Signature
static WitEntityIntData [] Meta.WitAi.WitResultUtilities.GetIntEntities(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode  The root response node of an VoiceService.events.OnResponse event
name: string  The entity name typically something like name:name
GetIntentName ( witResponse )
Gets the first intent's name
Signature
static string Meta.WitAi.WitResultUtilities.GetIntentName(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
string
GetIntents ( witResponse )
Gets all intents in the given response
Signature
static WitIntentData [] Meta.WitAi.WitResultUtilities.GetIntents(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The root response node of an VoiceService.events.OnResponse event
Returns
WitIntentData []
GetIsFinal ( witResponse )
Get whether this response is the final response returned from the service
Signature
static bool Meta.WitAi.WitResultUtilities.GetIsFinal(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetIsNlpFinal ( witResponse )
Get whether this response is a 'final' nlp response
Signature
static bool Meta.WitAi.WitResultUtilities.GetIsNlpFinal(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetIsNlpPartial ( witResponse )
Get whether this response is a 'final' nlp response
Signature
static bool Meta.WitAi.WitResultUtilities.GetIsNlpPartial(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetIsTranscriptionFinal ( witResponse )
Get whether this response is a 'final' transcription
Signature
static bool Meta.WitAi.WitResultUtilities.GetIsTranscriptionFinal(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetIsTranscriptionPartial ( witResponse )
Get whether this response is a 'final' transcription
Signature
static bool Meta.WitAi.WitResultUtilities.GetIsTranscriptionPartial(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
bool
GetPartialResponse ( witResponse )
Gets the content of a witResponse["partial_response"] node.
Signature
static WitResponseClass Meta.WitAi.WitResultUtilities.GetPartialResponse(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
GetPathValue ( response , path )
Signature
static string Meta.WitAi.WitResultUtilities.GetPathValue(this WitResponseNode response, string path)
Parameters
response: this WitResponseNode
path: string
Returns
string
GetRequestId ( witResponse )
Gets the unique request id if included in the response
Signature
static string Meta.WitAi.WitResultUtilities.GetRequestId(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
Returns
string
GetResponse ( witResponse )
Gets the content of a witResponse's partial or final response whichever is present.
Signature
static WitResponseClass Meta.WitAi.WitResultUtilities.GetResponse(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
GetResponseType ( witResponse )
Gets the content of a witResponse's partial or final response whichever is present.
Signature
static string Meta.WitAi.WitResultUtilities.GetResponseType(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode  The response node class or null if none was found.
Returns
string
GetStatusCode ( witResponse )
Returns if any status code is returned
Signature
static int Meta.WitAi.WitResultUtilities.GetStatusCode(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
int
GetTraitValue ( witResponse , name )
Gets the string value of the first trait
Signature
static string Meta.WitAi.WitResultUtilities.GetTraitValue(this WitResponseNode witResponse, string name)
Parameters
witResponse: this WitResponseNode
name: string
Returns
string
GetTranscription ( witResponse )
Get the transcription from a wit response node
Signature
static string Meta.WitAi.WitResultUtilities.GetTranscription(this WitResponseNode witResponse)
Parameters
witResponse: this WitResponseNode
Returns
string
GetWitResponseReference ( path )
Signature
static WitResponseReference Meta.WitAi.WitResultUtilities.GetWitResponseReference(string path)
Parameters
path: string
RemovePath ( response , path )
Signature
static void Meta.WitAi.WitResultUtilities.RemovePath(this WitResponseNode response, string path)
Parameters
response: this WitResponseNode
path: string
Returns
void
SafeGet ( witResponse , key )
Get whether this response is for transcriptions only
Signature
static WitResponseNode Meta.WitAi.WitResultUtilities.SafeGet(this WitResponseNode witResponse, string key)
Parameters
witResponse: this WitResponseNode
key: string
SetString ( response , path , value )
Signature
static void Meta.WitAi.WitResultUtilities.SetString(this WitResponseNode response, string path, string value)
Parameters
response: this WitResponseNode
path: string
value: string
Returns
void