The priority list is implemented by the or
. If known([word])
is non-empty set, its value is the value of the expression. If it's empty, the right-hand side
known(edits1(word)) or known_edits2(word) or [word]
is evaluated. E.g.
>>> [1, 2, 3] or [4, 5, 6]
[1, 2, 3]
>>> [] or [4, 5, 6]
[4, 5, 6]
Why didn't he start from 0?
That's Laplace smoothing. It's actually explained in the article.