android.speech.recognition
Interface SrecGrammar
- All Superinterfaces:
- EmbeddedGrammar, Grammar
- All Known Implementing Classes:
- SrecGrammarImpl
public interface SrecGrammar
- extends EmbeddedGrammar
Grammar on an SREC recognizer.
addItem
void addItem(String slotName,
SlotItem item,
int weight,
String semanticMeaning)
throws IllegalArgumentException
- Adds an item to a slot.
- Parameters:
slotName - the name of the slotitem - the item to add to the slot.weight - the weight of the item. Smaller values are more likely to get recognized. This should be >= 0.semanticMeaning - the value that will be returned if this item is recognized.
- Throws:
IllegalArgumentException - if slotName, item or semanticMeaning are null; if semanticMeaning is not of the format "V='Jen_Parker'"
addItemList
void addItemList(String slotName,
Vector<SrecGrammar.Item> items)
throws IllegalArgumentException
- Add a list of item to a slot.
- Parameters:
slotName - the name of the slotitems - the vector of SrecGrammar.Item to add to the slot.
- Throws:
IllegalArgumentException - if slotName,items are null or any element in the items(_item, _semanticMeaning) is null; if any semanticMeaning of the list is not of the format "key='value'"
Please submit a feedback, bug or feature