The edit distance between two strings is the minimum number of single-character insertions, deletions or substitutions needed to turn one into the other. For example, kitten → sitting takes 3.
Implement edit_distance(a, b) with dynamic programming in time. Then implement word_error_rate(reference, hypothesis): the edit distance between the two word lists (split on whitespace), divided by the number of reference words. Return 0.0 if both are empty, and float("inf") if only the reference is empty.