-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Simple English clause creation from arbitrary words
--
-- This library helps in generating simple present tense English
-- sentences from short, parametrized descriptions. In a typical use, the
-- structure of a clause is fixed, but the particular words to be used
-- vary in arbitrary ways. The main goal of the library is to minimize
-- the API complexity and the code size of programs that use it. The
-- library doesn't attempt to ban incorrect English sentences, but just
-- make the creation of the simple correct ones easy and predictable.
@package miniutter
@version 0.5.1.0
-- | Simple English clause creation parameterized by individual words.
module NLP.Miniutter.English
-- | Various basic and compound parts of English simple present tense
-- clauses. Many of the possible nestings do not make sense. We don't
-- care.
data Part
-- | handle for a String parameter
String :: !String -> Part
-- | handle for a Text parameter
Text :: !Text -> Part
-- | cardinal number, spelled in full up to 10
Cardinal :: !Int -> Part
-- | cardinal number, not spelled
Car :: !Int -> Part
-- | plural form of a phrase
Ws :: !Part -> Part
-- | plural prefixed with a cardinal, spelled, with "a" for 1 and "no" for
-- 0
CardinalAWs :: !Int -> !Part -> Part
-- | plural prefixed with a cardinal, spelled
CardinalWs :: !Int -> !Part -> Part
-- | plural prefixed with a cardinal, not spelled, with "a" for 1 and "no"
-- for 0
CarAWs :: !Int -> !Part -> Part
-- | plural prefixed with a cardinal, not spelled
CarWs :: !Int -> !Part -> Part
-- | plural prefixed with a cardinal, not spelled, with no prefix at all
-- for 1
Car1Ws :: !Int -> !Part -> Part
-- | ordinal number, spelled in full up to 10
Ordinal :: !Int -> Part
-- | ordinal number, not spelled
Ord :: !Int -> Part
-- | phrase with indefinite article
AW :: !Part -> Part
-- | enumeration
WWandW :: ![Part] -> Part
-- | collection
WWxW :: !Part -> ![Part] -> Part
-- | non-premodifying possesive
Wown :: !Part -> Part
-- | attributive possesive
WownW :: !Part -> !Part -> Part
-- | no space in between; one can also just use <>
Append :: !Part -> !Part -> Part
-- | space-separated sequence
Phrase :: ![Part] -> Part
-- | make the first letter into a capital letter
Capitalize :: !Part -> Part
-- | conjugation according to polarity, with a default person (pronouns
-- override it)
SubjectVerb :: !Person -> !Polarity -> !Part -> !Part -> Part
-- | a shorthand for Sg3rd and Yes
SubjectVerbSg :: !Part -> !Part -> Part
-- | conjugation of all verbs according to polarity, with a default person
-- (pronouns override it)
SubjectVVxV :: !Part -> !Person -> !Polarity -> !Part -> ![Part] -> Part
-- | a shorthand for "and", Sg3rd and Yes
SubjectVVandVSg :: !Part -> ![Part] -> Part
-- | Persons: singular 1st, singular 3rd and the rest.
data Person
Sg1st :: Person
Sg3rd :: Person
PlEtc :: Person
-- | Generalized polarity: affirmative, negative, interrogative.
data Polarity
Yes :: Polarity
No :: Polarity
Why :: Polarity
-- | Nouns with irregular plural form and nouns with irregular indefinite
-- article.
data Irregular
Irregular :: Map Text Text -> Map Text Text -> Irregular
[irrPlural] :: Irregular -> Map Text Text
[irrIndefinite] :: Irregular -> Map Text Text
-- | Realise a complete sentence, capitalized, ending with a dot.
makeSentence :: Irregular -> [Part] -> Text
-- | Realise a phrase. The spacing between parts resembles the semantics of
-- (<+>), that is, it ignores empty words.
makePhrase :: Irregular -> [Part] -> Text
-- | Default set of words with irregular forms.
defIrregular :: Irregular
-- | Separated by space unless one of them is empty (in which case just the
-- non-empty one).
(<+>) :: Text -> Text -> Text
infixr 6 <+>
instance GHC.Generics.Generic NLP.Miniutter.English.Part
instance GHC.Classes.Ord NLP.Miniutter.English.Part
instance GHC.Classes.Eq NLP.Miniutter.English.Part
instance GHC.Show.Show NLP.Miniutter.English.Part
instance GHC.Generics.Generic NLP.Miniutter.English.Polarity
instance GHC.Classes.Ord NLP.Miniutter.English.Polarity
instance GHC.Classes.Eq NLP.Miniutter.English.Polarity
instance GHC.Show.Show NLP.Miniutter.English.Polarity
instance GHC.Generics.Generic NLP.Miniutter.English.Person
instance GHC.Classes.Ord NLP.Miniutter.English.Person
instance GHC.Classes.Eq NLP.Miniutter.English.Person
instance GHC.Show.Show NLP.Miniutter.English.Person
instance Data.Binary.Class.Binary NLP.Miniutter.English.Part
instance GHC.Read.Read NLP.Miniutter.English.Part
instance Data.String.IsString NLP.Miniutter.English.Part
instance GHC.Base.Semigroup NLP.Miniutter.English.Part
instance GHC.Base.Monoid NLP.Miniutter.English.Part
instance Data.Binary.Class.Binary NLP.Miniutter.English.Polarity
instance Data.Binary.Class.Binary NLP.Miniutter.English.Person