fix(owothia): Use correct articles
I'm an owothia, owo Change-Id: I59d523268851e792067e10d440147d12409c60f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1833 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
This commit is contained in:
parent
35b214ae9f
commit
a57f1469ef
1 changed files with 16 additions and 4 deletions
|
@ -85,11 +85,23 @@ instance Random OwoType where
|
|||
random = over _1 (bool Noun Verb) . random
|
||||
randomR = const random
|
||||
|
||||
vowels :: [Char]
|
||||
vowels = "aeiou"
|
||||
|
||||
article :: Text -> Text
|
||||
article (x :< _) | x `elem` vowels = "an"
|
||||
article _ = "a"
|
||||
|
||||
owo :: OwoType -> Text -> Text
|
||||
owo Noun n =
|
||||
if "o" `Data.Text.isSuffixOf` n
|
||||
then "I'm a " <> n <> "wo"
|
||||
else "I'm a " <> n <> " owo"
|
||||
owo Noun n = mconcat
|
||||
[ "I'm "
|
||||
, article n
|
||||
, " "
|
||||
, n
|
||||
, if "o" `Data.Text.isSuffixOf` n
|
||||
then "wo"
|
||||
else " owo"
|
||||
]
|
||||
owo Verb v = v <> " me owo"
|
||||
|
||||
pickOwo :: OwoType -> POS Tag -> Maybe Text
|
||||
|
|
Loading…
Reference in a new issue