drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Chunk.Concept.NamedCombinators

Description

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 pluralNP case for combinators will be first term singular, second term plural.
  • P and S denote the pluralNP 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 and NP denote whether something must be a part of the NamedIdea or NounPhrase class.
Synopsis

Prepositions

"The" Combinators

the :: NamedIdea t => t -> NP Source #

Prepends "the" to a NamedIdea.

theGen :: (t -> NPStruct) -> t -> NP Source #

A customizable version of the. The given function is applied to both singular and pluralNP cases.

"A" Combinators

a_ :: NamedIdea c => c -> NP Source #

Prepends "a" to a NamedIdea (similar to the).

a_Gen :: (c -> NPStruct) -> c -> NP Source #

Customizable version of a.

Conjunctions

"And" Combinators

and_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (phraseNP t1) "and" (pluralNP t2).

and_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (pluralNP t1) "and" (phraseNP t2).

and_PP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "and" between their terms. Plural case is (pluralNP t1) "and" (pluralNP t2).

and_TGen :: (NamedIdea c, NamedIdea d) => (c -> NPStruct) -> (d -> NPStruct) -> c -> d -> NP Source #

Customizable and_ combinator (takes two title case capitalization rules and two NamedIdeas).

andIts :: (NamedIdea a, NamedIdea b) => a -> b -> NP Source #

Creates a NP by combining two NamedIdeas with the words "and its" between their terms. Plural case is (phraseNP t1) "and its" (pluralNP t2).

andThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "and the" between their terms. Plural case is (phraseNP t1) "and the" (pluralNP t2).

"Of" Combinators

of_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "of" between their terms. Plural case is (phraseNP t1) "of" (pluralNP t2).

of_NINP :: NamedIdea c => c -> NP -> NP Source #

Same as of_ but second argument is NP.

of_PSNPNI :: NamedIdea d => NP -> d -> NP Source #

Same as of_ but first argument is a NounPhrase and pluralNP case is (pluralNP t1) "of" (phraseNP t2).

of_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_, except pluralNP case is (pluralNP t1) "of" (phraseNP t2).

ofA :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_PS, except combining 'NPStruct piece is "of a".

ofAPS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as of_, except combining 'NPStruct piece is "of the". Plural case is (phraseNP t1) ofThe (pluralNP t2).

ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as ofThe, except pluralNP case is (pluralNP t1) ofThe (phraseNP t2).

"The" Combinators

the_ofThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as ofThe, except prepends "the".

the_ofThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as the_ofThe, except pluralNP case is (pluralNP t1) the_ofThe (phraseNP t2)

onThe :: (NamedIdea a, NamedIdea b) => a -> b -> NP Source #

Same as of_, except combining NPStruct piece is "on the".

onThePS :: (NamedIdea a, NamedIdea b) => a -> b -> NP Source #

Same as onThe, except pluralNP case is (pluralNP t1) NP.onThe (phraseNP t2)

onThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as onThe, except pluralNP case is (pluralNP t1) NP.onThe (pluralNP t2)

inThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (phraseNP t1) "in the" (pluralNP t2).

inThePS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (pluralNP t1) "in the" (phraseNP t2).

inThePP :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in the" between their terms. Plural case is (pluralNP t1) "in the" (pluralNP t2).

isThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "is the" between their terms. Plural case is (phraseNP t1) "is the" (pluralNP t2).

toThe :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "to the" between their terms. Plural case is (phraseNP t1) "to the" (pluralNP t2).

"For" Combinators

for :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "for" between their terms. Plural case is (phraseNP t1) "for" (pluralNP t2).

forTGen :: (NamedIdea c, Idea d) => (c -> NPStruct) -> (d -> NPStruct) -> c -> d -> NP Source #

Similar to for, but takes two functions that determine the titleCase.

"In" Combinators

in_ :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "in" between their terms. Plural case is (phraseNP t1) "in" (pluralNP t2).

in_PS :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Same as in_, except pluralNP case is (pluralNP t1) "in" (phraseNP t2).

inA :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the words "in a" between their terms. Plural case is (phraseNP t1) "in a" (pluralNP t2).

Other Combinators

is :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Creates a NP by combining two NamedIdeas with the word "is" between their terms. Plural case is (phraseNP t1) "is" (pluralNP t2).

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 (pluralNP t1) "with" (phraseNP t2) while the pluralNP case pluralizes the first.

Direct Term Combinators

Some are specific to IdeaDicts.

compoundNC :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #

Combinator for combining two NamedIdeass into a IdeaDict. Plural case only makes second term plural. See compoundPhrase for more on pluralNP behaviour. Does not preserve abbreviations.

compoundNCPP :: (NamedIdea a, NamedIdea b) => a -> b -> IdeaDict Source #

Similar to compoundNC but both terms are pluralized for pluralNP case.

compoundNCGen :: (NamedIdea a, NamedIdea b) => (NP -> NPStruct) -> (NP -> NPStruct) -> a -> b -> IdeaDict Source #

Similar to compoundNC, except pluralNP cases are customizable.

compoundNCPS :: IdeaDict -> IdeaDict -> IdeaDict Source #

Similar to compoundNC, except for pluralNP 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 -> NPStruct) -> a -> b -> IdeaDict Source #

Similar to compoundNC, but takes a function that is applied to the first term (eg. short or plural).

combineNINP :: NamedIdea c => c -> NP -> NP Source #

Helper function that combines a NamedIdea and a NP without any words in between. Plural case is (phraseNP t1) :+: (pluralNP t2).

combineNINI :: (NamedIdea c, NamedIdea d) => c -> d -> NP Source #

Similar to combineNINP but takes two NamedIdeas.