QL for QL: add predicate for other typos not in the shared typo db

This commit is contained in:
Nick Rolfe
2022-05-12 14:25:39 +01:00
parent 6058352fb0
commit 844eef173c

View File

@@ -4,12 +4,16 @@ private import TypoDatabase
predicate misspelling(string wrong, string right, string mistake) {
mistake = "common misspelling" and
typos(wrong, right)
(typos(wrong, right) or additional_typos(wrong, right))
or
mistake = "non-US spelling" and
non_us_spelling(wrong, right)
}
predicate additional_typos(string wrong, string right) {
wrong = "tranformer" and right = "transformer"
}
/**
* Holds if `word` is an acceptable spelling that would otherwise be considered
* a mistake by the typo database.