From 0d8bb25bae36ad9e6abb516ee8ec2685c94f0e08 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 3 Aug 2020 18:42:58 +0200 Subject: feat(owothia): further owo nouns Change-Id: I11876d617b6efed443b35b8193cc7a42cf0f0201 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1600 Reviewed-by: Profpatsch --- users/glittershark/owothia/src/Main.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'users/glittershark/owothia') diff --git a/users/glittershark/owothia/src/Main.hs b/users/glittershark/owothia/src/Main.hs index bdb8d8802a..6c954b7c3f 100644 --- a/users/glittershark/owothia/src/Main.hs +++ b/users/glittershark/owothia/src/Main.hs @@ -13,6 +13,7 @@ import qualified Data.ByteString as BS import System.Random import System.Envy import Data.Maybe +import qualified Data.Text -------------------------------------------------------------------------------- data Config = Config @@ -85,7 +86,10 @@ instance Random OwoType where randomR = const random 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" pickOwo :: OwoType -> POS Tag -> Maybe Text -- cgit 1.4.1