diff options
| author | adelon <22380201+adelon@users.noreply.github.com> | 2024-05-07 18:16:11 +0200 |
|---|---|---|
| committer | adelon <22380201+adelon@users.noreply.github.com> | 2024-05-07 18:16:11 +0200 |
| commit | e89c483a06f16cfd1e6a1c472c06e70854058654 (patch) | |
| tree | e7d2557cc83e82450bd1500083d341f212753e7f /source | |
| parent | b2f9f7900ccb4a569ed23e9ecf327564dbba2b7d (diff) | |
Update noun guessing
Diffstat (limited to 'source')
| -rw-r--r-- | source/Syntax/Adapt.hs | 2 |
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'))] |
