DictionaryIta checked for unsound verb entries

This commit is contained in:
aarne
2014-12-07 13:35:03 +00:00
parent a080258582
commit 4ef0a64fba
2 changed files with 78 additions and 74 deletions

View File

@@ -18,10 +18,14 @@ isError lang u v = case lang of
"mkV" | head v == '"' -> notElem (dp 2 (stringOf v)) ["ar","er","ir","se"]
"mkV2" | head v == '"' -> notElem (dp 2 (stringOf v)) ["ar","er","ir","se"]
_ -> False
"Ita" -> case bareOp u of
"mkV" | head v == '"' -> notElem (dp 3 (stringOf v)) ["are","ere","ire","rsi"]
"mkV2" | head v == '"' -> notElem (dp 3 (stringOf v)) ["are","ere","ire","rsi"]
_ -> False
dp :: Int -> String -> String
dp i s = drop (length s - i) s
stringOf s = takeWhile (/='"') (tail s)
bareOp = filter (notElem "()")
bareOp = filter (flip notElem "()")