Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines various chunk combinators. The full naming scheme can be found in the Wiki. For convenience, here is a summary:
- Combinators that conflict with haskell-native functions have an underscore appended.
- Default plural case for combinators will be first term singular, second term plural.
P
andS
denote the plural case of the combinator when it does not follow the above default.Gen
denotes the general function case.- Although this should eventually be phased out,
T
denotes a combinator meant for use with titles. NI
andNP
denote whether something must be a part of theNamedIdea
orNounPhrase
class.
Synopsis
- the :: NamedIdea t => t -> NP
- theGen :: (t -> Sentence) -> t -> NP
- a_ :: NamedIdea c => c -> NP
- a_Gen :: (c -> Sentence) -> c -> NP
- and_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- and_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- and_PP :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- and_TGen :: (NamedIdea c, NamedIdea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP
- and_Gen :: (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP
- andIts :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- andThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- of_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- of_NINP :: (NamedIdea c, NounPhrase d) => c -> d -> NP
- of_PSNPNI :: (NounPhrase c, NamedIdea d) => c -> d -> NP
- of_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- ofA :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- ofAPS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- the_ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- the_ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- onThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- onThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- onThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- inThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- inThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- inThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- isThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- toThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- for :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- forTGen :: (NamedIdea c, Idea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP
- in_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- in_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- inA :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- is :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- with :: (NamedIdea c, NamedIdea d) => c -> d -> NP
- compoundNC :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
- compoundNCPP :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict
- compoundNCGen :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> (NP -> Sentence) -> a -> b -> IdeaDict
- compoundNCPS :: IdeaDict -> IdeaDict -> IdeaDict
- compoundNCPSPP :: IdeaDict -> IdeaDict -> IdeaDict
- compoundNCGenP :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> a -> b -> IdeaDict
- combineNINP :: NamedIdea c => c -> NP -> NP
- combineNPNI :: NamedIdea c => NP -> c -> NP
- combineNINI :: (NamedIdea c, NamedIdea d) => c -> d -> NP
Prepositions
"The" Combinators
theGen :: (t -> Sentence) -> t -> NP Source #
A customizable version of the
. The given function is applied to both singular and plural cases.
"A" Combinators
Conjunctions
"And" Combinators
and_TGen :: (NamedIdea c, NamedIdea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #
Customizable and_
combinator (takes two title case capitalization rules and two NamedIdeas
).
and_Gen :: (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #
Customizable and_
combinator. Both plural and singular cases are dermined by the two given functions
"Of" Combinators
of_NINP :: (NamedIdea c, NounPhrase d) => c -> d -> NP Source #
Same as of_
but second argument is a NounPhrase
.
of_PSNPNI :: (NounPhrase c, NamedIdea d) => c -> d -> NP Source #
Same as of_
but first argument is a NounPhrase
and plural case is (plural t1) "of" (phrase t2)
.
of_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as of_
, except plural case is (plural t1) "of" (phrase t2)
.
ofAPS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as ofA
, except phrase case is (plural t1) "of a" (phrase t2)
.
"The" Combinators
the_ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as ofThe
, except prepends "the".
onThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as of_
, except combining Sentence piece is "on the".
onThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as onThe
, except plural case is (plural t1) S.onThe (phrase t2)
onThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as onThe
, except plural case is (plural t1) S.onThe (plural t2)
"For" Combinators
forTGen :: (NamedIdea c, Idea d) => (c -> Sentence) -> (d -> Sentence) -> c -> d -> NP Source #
Similar to for
, but takes two functions that determine the titleCase
.
"In" Combinators
in_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Same as in_
, except plural case is (plural t1) "in" (phrase t2)
.
Other Combinators
with :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Case with "T1s with T2", as opposed to "T1 with T2", i.e.
singular case is (plural t1) "with" (phrase t2)
while the plural case pluralizes the first.
Direct Term Combinators
Some are specific to IdeaDict
s.
compoundNC :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #
Combinator for combining two NamedIdeas
s into a IdeaDict
.
Plural case only makes second term plural.
See compoundPhrase
for more on plural behaviour.
Does not preserve abbreviations.
compoundNCPP :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #
Similar to compoundNC
but both terms are pluralized for plural case.
compoundNCGen :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> (NP -> Sentence) -> a -> b -> IdeaDict Source #
Similar to compoundNC
, except plural cases are customizable.
compoundNCPS :: IdeaDict -> IdeaDict -> IdeaDict Source #
Similar to compoundNC
, except for plural case, where first parameter gets pluralized while second one stays singular.
compoundNCPSPP :: IdeaDict -> IdeaDict -> IdeaDict Source #
Similar to compoundNCGenP
but sets first parameter function to plural.
compoundNCGenP :: (NamedIdea a, NamedIdea b) => (NP -> Sentence) -> a -> b -> IdeaDict Source #
Similar to compoundNC
, but takes a function that is applied to the first term (eg. short
or plural
).
combineNPNI :: NamedIdea c => NP -> c -> NP Source #
Similar to combineNINP
but takes in a NP
first and a NamedIdea
second.
combineNINI :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #
Similar to combineNINP
but takes two NamedIdea
s.