summaryrefslogtreecommitdiff
path: root/source/Syntax/Adapt.hs
diff options
context:
space:
mode:
Diffstat (limited to 'source/Syntax/Adapt.hs')
-rw-r--r--source/Syntax/Adapt.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/Syntax/Adapt.hs b/source/Syntax/Adapt.hs
index 0896c08..b1237d2 100644
--- a/source/Syntax/Adapt.hs
+++ b/source/Syntax/Adapt.hs
@@ -313,6 +313,8 @@ guessNounPlural item = SgPl item (pluralize item)
pluralize :: LexicalPhrase -> LexicalPhrase
pluralize = \case
Just (Word w) : pat'@(Just w' : _) | isPreposition w' -> Just (Word (Text.snoc w 's')) : pat'
+ tok : Just (Word w) : pat'@(Just w' : _) | isPreposition w' -> tok : Just (Word (Text.snoc w 's')) : pat'
+ tok1 : tok2 : Just (Word w) : pat'@(Just w' : _) | isPreposition w' -> tok1 : tok2 : Just (Word (Text.snoc w 's')) : pat'
[Just (Word w)] -> [Just (Word (Text.snoc w 's'))]
[tok, Just (Word w)] -> [tok, Just (Word (Text.snoc w 's'))]
[tok, tok', Just (Word w)] -> [tok, tok', Just (Word (Text.snoc w 's'))]