This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Probability of a spelling correction, c = | |
# Probability(c is a word) * | |
# Probability(original is a typo for c) | |
# Best correction = | |
# one with highest probability | |
# Probability(c is a word) = | |
# estimated by counting | |
# Probability(original is a typo for c) = | |
# proportional to number of changes | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Probability of a segmentation = | |
# Probability(first word) * Probability(rest) | |
# Best segmentation = | |
# one with highest probability | |
# Probability(word) | |
# estimated by counting | |
# Eg. Best segmentation("nowisthetime...") | |
# Pf("n") * Pr("owisthetime...") = .003% * 10^-30% = 10^-34% | |
# Pf("no") * Pr("wisthetime...") = .26% * 10^-26% = 10^-29% |