about summary refs log tree commit diff
path: root/users/glittershark/owothia
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-08-03T16·42+0200
committerProfpatsch <mail@profpatsch.de>2020-08-03T16·47+0000
commit0d8bb25bae36ad9e6abb516ee8ec2685c94f0e08 (patch)
tree244ce9350ade2a59bedbc08fbd00e224ed6c2bb1 /users/glittershark/owothia
parent117e7316a00768e17f654a3c64a9eb5fb45aad72 (diff)
feat(owothia): further owo nouns r/1565
Change-Id: I11876d617b6efed443b35b8193cc7a42cf0f0201
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1600
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/glittershark/owothia')
-rw-r--r--users/glittershark/owothia/src/Main.hs6
1 files changed, 5 insertions, 1 deletions
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