module Language.Drasil.NounPhrase.Combinators (
insertString, prependString, insertSent, prependSent,
the, theGen,
a_, a_Gen,
and_, and_PS, and_Gen, and_GenGen, andThe,
ofThe, ofThePS, ofTheGen, inThe, inThePS, inTheGen,
the_ofThe, the_ofThePS, the_ofTheGen,
for, forPS, forGen,
of_, of_PS, of_Gen, of_GenGen,
with
) where
import Language.Drasil.NounPhrase
( NP,
CapitalizationRule(CapWords, CapFirst),
NounPhrase(phraseNP, pluralNP),
nounPhrase'' )
import Language.Drasil.Sentence ( Sentence(S), (+:+) )
import qualified Language.Drasil.Sentence.Combinators as S
insertString :: String -> NP -> NP -> NP
insertString :: String -> NP -> NP -> NP
insertString String
s NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
+:+ String -> Sentence
S String
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
pluralNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
prependString :: String -> NP -> NP
prependString :: String -> NP -> NP
prependString String
s NP
t1 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (String -> Sentence
S String
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1) (String -> Sentence
S String
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1) CapitalizationRule
CapFirst CapitalizationRule
CapWords
insertSent :: Sentence -> NP -> NP -> NP
insertSent :: Sentence -> NP -> NP -> NP
insertSent Sentence
s NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
+:+ Sentence
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
+:+ Sentence
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
pluralNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
prependSent :: Sentence -> NP -> NP
prependSent :: Sentence -> NP -> NP
prependSent Sentence
s NP
t1 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (Sentence
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1) (Sentence
s Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1) CapitalizationRule
CapFirst CapitalizationRule
CapWords
the :: NP -> NP
the :: NP -> NP
the = String -> NP -> NP
prependString String
"the"
theGen :: (NP -> Sentence) -> NP -> NP
theGen :: (NP -> Sentence) -> NP -> NP
theGen NP -> Sentence
f1 NP
t1 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (String -> Sentence
S String
"the" Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1) (String -> Sentence
S String
"the" Sentence -> Sentence -> Sentence
+:+ NP -> Sentence
f1 NP
t1) CapitalizationRule
CapFirst CapitalizationRule
CapWords
a_ :: NP -> NP
a_ :: NP -> NP
a_ = String -> NP -> NP
prependString String
"a"
a_Gen :: (NP -> Sentence) -> NP -> NP
a_Gen :: (NP -> Sentence) -> NP -> NP
a_Gen NP -> Sentence
f1 NP
t1 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (String -> Sentence
S String
"a" Sentence -> Sentence -> Sentence
+:+ forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1) (String -> Sentence
S String
"a" Sentence -> Sentence -> Sentence
+:+ NP -> Sentence
f1 NP
t1) CapitalizationRule
CapFirst CapitalizationRule
CapWords
ofThe :: NP -> NP -> NP
ofThe :: NP -> NP -> NP
ofThe = String -> NP -> NP -> NP
insertString String
"of the"
ofThePS :: NP -> NP -> NP
ofThePS :: NP -> NP -> NP
ofThePS NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.ofThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1 Sentence -> Sentence -> Sentence
`S.ofThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
ofTheGen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.ofThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.ofThe` NP -> Sentence
f2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
inThe :: NP -> NP -> NP
inThe :: NP -> NP -> NP
inThe = String -> NP -> NP -> NP
insertString String
"in the"
inThePS :: NP -> NP -> NP
inThePS :: NP -> NP -> NP
inThePS NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.inThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1 Sentence -> Sentence -> Sentence
`S.inThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
inTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
inTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
inTheGen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.inThe` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.inThe` NP -> Sentence
f2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
the_ofThe :: NP -> NP -> NP
the_ofThe :: NP -> NP -> NP
the_ofThe NP
t1 NP
t2 = NP -> NP
the NP
t1 NP -> NP -> NP
`ofThe` NP
t2
the_ofThePS :: NP -> NP -> NP
the_ofThePS :: NP -> NP -> NP
the_ofThePS NP
t1 NP
t2 = NP -> NP
the NP
t1 NP -> NP -> NP
`ofThePS` NP
t2
the_ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
the_ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
the_ofTheGen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 = (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
ofTheGen NP -> Sentence
f1 NP -> Sentence
f2 (NP -> NP
the NP
t1)
for :: NP -> NP -> NP
for :: NP -> NP -> NP
for = String -> NP -> NP -> NP
insertString String
"for"
forPS :: NP -> NP -> NP
forPS :: NP -> NP -> NP
forPS NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.for` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1 Sentence -> Sentence -> Sentence
`S.for` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
forGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
forGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
forGen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.for` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.for` NP -> Sentence
f2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
of_ :: NP -> NP -> NP
of_ :: NP -> NP -> NP
of_ = String -> NP -> NP -> NP
insertString String
"of"
of_PS :: NP -> NP -> NP
of_PS :: NP -> NP -> NP
of_PS NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.of_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1 Sentence -> Sentence -> Sentence
`S.of_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
of_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
of_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
of_Gen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.of_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.of_` NP -> Sentence
f2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
of_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
of_GenGen :: (NP -> Sentence)
-> (NP -> Sentence)
-> (NP -> Sentence)
-> (NP -> Sentence)
-> NP
-> NP
-> NP
of_GenGen NP -> Sentence
f1 NP -> Sentence
f2 NP -> Sentence
p1 NP -> Sentence
p2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.of_` NP -> Sentence
f2 NP
t2) (NP -> Sentence
p1 NP
t1 Sentence -> Sentence -> Sentence
`S.of_` NP -> Sentence
p2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
with :: NP -> NP -> NP
with :: NP -> NP -> NP
with = String -> NP -> NP -> NP
insertString String
"with"
and_ :: NP -> NP -> NP
and_ :: NP -> NP -> NP
and_ = String -> NP -> NP -> NP
insertString String
"and"
and_PS :: NP -> NP -> NP
and_PS :: NP -> NP -> NP
and_PS NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.and_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (forall n. NounPhrase n => n -> Sentence
pluralNP NP
t1 Sentence -> Sentence -> Sentence
`S.and_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
and_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
and_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
and_Gen NP -> Sentence
f1 NP -> Sentence
f2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (forall n. NounPhrase n => n -> Sentence
phraseNP NP
t1 Sentence -> Sentence -> Sentence
`S.and_` forall n. NounPhrase n => n -> Sentence
phraseNP NP
t2) (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.and_` NP -> Sentence
f2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
and_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
and_GenGen :: (NP -> Sentence)
-> (NP -> Sentence)
-> (NP -> Sentence)
-> (NP -> Sentence)
-> NP
-> NP
-> NP
and_GenGen NP -> Sentence
f1 NP -> Sentence
f2 NP -> Sentence
p1 NP -> Sentence
p2 NP
t1 NP
t2 = Sentence
-> Sentence -> CapitalizationRule -> CapitalizationRule -> NP
nounPhrase'' (NP -> Sentence
f1 NP
t1 Sentence -> Sentence -> Sentence
`S.and_` NP -> Sentence
f2 NP
t2) (NP -> Sentence
p1 NP
t1 Sentence -> Sentence -> Sentence
`S.and_` NP -> Sentence
p2 NP
t2) CapitalizationRule
CapFirst CapitalizationRule
CapWords
andThe :: NP -> NP -> NP
andThe :: NP -> NP -> NP
andThe = String -> NP -> NP -> NP
insertString String
"and the"