| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.NounPhrase.Core
Contents
Description
Noun phrases are used to hold terms with knowledge of proper capitalization and pluralization.
Synopsis
- data CapitalizationRule
- data NP
- type PluralForm = NPStruct
- data PluralRule
- data NPStruct
Types
data CapitalizationRule Source #
Capitalization rules.
Constructors
| CapFirst | Capitalize the first letter of the first word only. |
| CapWords | Capitalize the first letter of each word. |
| Replace NPStruct | Replace the noun phrase with the given 'NPStruct. Used for custom capitalization. |
| CapNothing |
For nouns and NounPhrases. May be constructed from a
proper noun, common noun, or phrase (Sentence) and their
respective pluralization and capitalization rules.
Constructors
| ProperNoun String PluralRule | Stores a proper noun and its pluralization. |
| CommonNoun String PluralRule CapitalizationRule | Stores a common noun and its pluralization. |
| Phrase NPStruct PluralForm CapitalizationRule CapitalizationRule | Stores noun phrase and its pluralization. Phrase plurals can get very odd, so it seems best (for now) to encode them directly. FIXME: If the singular/plural phrase has special (replace) capitalization, one of the two cannot be capitalized right now. The two capitalization rules are for sentenceCase / titleCase respectively |
type PluralForm = NPStruct Source #
Synonym for 'NPStruct typically used for plural forms.
data PluralRule Source #
Pluralization rules.