Parsing Utterances

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

Extracting data


Extracts date and time information from a sentence.

See extract_datetime()


Convert an english phrase into a number of seconds.

See extract_duration()


extract_number() takes in a string and extracts a single number.

extract_numbers() takes in a string and extracts a list of numbers.


Vocab Matching

voc_match() determines if the given utterance contains the vocabulary provided.

Fuzzy Matching

fuzzy_match() performs a ‘fuzzy’ comparison between two strings.

Match One

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

Last updated