feat(owothia): further owo nouns

Change-Id: I11876d617b6efed443b35b8193cc7a42cf0f0201
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1600
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2020-08-03 18:42:58 +02:00
parent 117e7316a0
commit 0d8bb25bae

View file

@ -13,6 +13,7 @@ import qualified Data.ByteString as BS
import System.Random import System.Random
import System.Envy import System.Envy
import Data.Maybe import Data.Maybe
import qualified Data.Text
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
data Config = Config data Config = Config
@ -85,7 +86,10 @@ instance Random OwoType where
randomR = const random randomR = const random
owo :: OwoType -> Text -> Text owo :: OwoType -> Text -> Text
owo Noun n = "I'm a " <> n <> " owo" owo Noun n =
if "o" `Data.Text.isSuffixOf` n
then "I'm a " <> n <> "wo"
else "I'm a " <> n <> " owo"
owo Verb v = v <> " me owo" owo Verb v = v <> " me owo"
pickOwo :: OwoType -> POS Tag -> Maybe Text pickOwo :: OwoType -> POS Tag -> Maybe Text