public interface Concept
Take the example of a call to sell insurance. The seller greets the customer, tries to sell insurance, and closes the call. We can say that we are interested in 3 concepts - an opening concept, a selling concept, and a closing concept.
Often there are many ways to convey the same concept, for example, in an opening the seller may choose to greet the customer with the phrases "good morning" or "good afternoon". The exact phrase the seller chooses to use is not important, we just want to capture if the seller used an appropriate greeting.
We can build a concept from a group of phrases or search terms. For example, we might say that sellers generally use either of two phrases to close a call; "Thank you for calling" or "We appreciate your call". In this case our closing concept has two phrases and either of these phrases satisfies the concept. To capture this relationship between the concept and the phrases we can use an operator (In this case an ANY operator).
A Concept, therefore, represents a group of search terms constructed with logical conditions defining how matches for the individual search terms are combined in the query.
For example, a concept ("greeting") could be defined that uses three phrases ("hello", "good morning", "good afternoon") combined with a logical "ANY" condition. The assertion that the concept ("greeting") is met, requires that any of the terms ("hello", "good morning" or "good afternoon") are spoken in a conversation.
When constructing concepts using more than one phrase, the relationships
between the search terms are expressed through the use of Operator
s.
An Operator
applies the logical conditions.
The Concept is only considered matched when the confidence level of the
SpeechSearchMatch
exceeds the threshold value specified.
Operator
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_THRESHOLD
The default threshold.
|
Modifier and Type | Method and Description |
---|---|
Concept |
addPhrase(String phrase,
float threshold)
Add a phrase and threshold to the concept
|
Concept |
addPhrase(String id,
String phrase,
float threshold)
Add a phrase with a unique identifier and threshold to the concept.
|
String |
getName()
The name of the concept.
|
Operator |
getOperator()
Get the operator for the concept.
|
List |
getPhrases()
The collection of phrases belonging to the concept.
|
List |
getSubConcepts()
The collection of sub concepts belonging to the concept.
|
float |
getThreshold()
Get the threshold for the concept.
|
Concept |
setName(String name)
Sets the concept name
|
Concept |
setOperator(Operator operator)
Sets the concept operator type
|
Concept |
setSubConcepts(Concept[] concept)
Set the list of concepts to match
|
Concept |
setThreshold(float threshold)
Sets the threshold for matching this concept
|
static final float DEFAULT_THRESHOLD
String getName()
Operator getOperator()
float getThreshold()
SpeechSearchMatch
occurs it has a confidence level. If the confidence level exceeds the
threshold then the concept is considered matched.
The threshold is a value between 0 and 100.List getSubConcepts()
List getPhrases()
Concept setOperator(Operator operator)
operator
- the concept operatorConcept setThreshold(float threshold)
threshold
- the threshold of the conceptConcept setSubConcepts(Concept[] concept)
concept
- the list of conceptsConcept addPhrase(String phrase, float threshold)
phrase
- the phase to add to the conceptthreshold
- the value the confidence level must exceed for a matchConcept addPhrase(String id, String phrase, float threshold)
id
- the unique identifier for the search phrasephrase
- the phrase to add to the conceptthreshold
- the value the confidence level must exceed for a matchCopyright © 2016 Avaya. All Rights Reserved.