public interface SlotParser
Modifier and Type | Method and Description |
---|---|
Object |
parse(Map<String,Object> metadata,
String rawValue)
Parse a raw string value from an utterance into a typed value for a
concrete slot.
|
Object parse(Map<String,Object> metadata, String rawValue) throws Exception
Implementers should throw an exception if the parsed value is invalid according to the supplied metadata.
metadata
- A map representing metadata for the particular slot being
parsed.rawValue
- The string from a user utterance that represents a slot
value.value
.Exception
- if there is an error during parsing.Copyright © 2020. All rights reserved.