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()

Duration

Convert an english phrase into a number of seconds.

See extract_duration()

Numbers

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

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

Matching

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