Parsing Utterances

Mycroft provides a range of easy to use methods to parse the contents of utterances from Users.

Extracting data

Datetime

Extracts date and time information from a sentence.

See extract_datetime()arrow-up-right

Duration

Convert an english phrase into a number of seconds.

See extract_duration()arrow-up-right

Numbers

extract_number()arrow-up-right takes in a string and extracts a single number.

extract_numbers()arrow-up-right takes in a string and extracts a list of numbers.

Matching

Vocab Matching

voc_match()arrow-up-right determines if the given utterance contains the vocabulary provided.

Fuzzy Matching

fuzzy_match()arrow-up-right performs a ‘fuzzy’ comparison between two strings.

Match One

match_one()arrow-up-right finds the best match from a list or dictionary given an input.

Last updated

Was this helpful?