Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines various NounPhrase-level combinators. These hold more information than those of the Sentence level but may not necessarily have a conceptual link. See the Wiki for more information and details about the naming process for combinators. A summary of the function naming scheme is as follows:
- 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.
This module should be used as a qualified import (usually as NP
),
as many function names clash with those in Concepts.hs and Sentence.hs.
Synopsis
- insertString :: String -> NP -> NP -> NP
- prependString :: String -> NP -> NP
- insertSent :: Sentence -> NP -> NP -> NP
- prependSent :: Sentence -> NP -> NP
- the :: NP -> NP
- theGen :: (NP -> Sentence) -> NP -> NP
- a_ :: NP -> NP
- a_Gen :: (NP -> Sentence) -> NP -> NP
- and_ :: NP -> NP -> NP
- and_PS :: NP -> NP -> NP
- and_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- and_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- andThe :: NP -> NP -> NP
- ofThe :: NP -> NP -> NP
- ofThePS :: NP -> NP -> NP
- ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- inThe :: NP -> NP -> NP
- inThePS :: NP -> NP -> NP
- inTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- the_ofThe :: NP -> NP -> NP
- the_ofThePS :: NP -> NP -> NP
- the_ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- for :: NP -> NP -> NP
- forPS :: NP -> NP -> NP
- forGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- of_ :: NP -> NP -> NP
- of_PS :: NP -> NP -> NP
- of_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- of_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP
- with :: NP -> NP -> NP
General Combinator Helper Functions
Prepositions
"The" Combinators
theGen :: (NP -> Sentence) -> NP -> NP Source #
Similar to the
, but accepts a function that determines the plural case.
"A" Combinators
a_Gen :: (NP -> Sentence) -> NP -> NP Source #
Similar to a
, but accepts a function that determines the plural case.
Conjunctions
"And" Combinators
and_ :: NP -> NP -> NP Source #
Inserts "and" between two NP
s. Plural case is (phraseNP t1) +:+ "and" +:+ (pluralNP t2)
.
and_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Same as and_
, but takes two functions for the plural case.
and_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Same as and_
, but takes two functions for the singular case and two for the plural case.
andThe :: NP -> NP -> NP Source #
Inserts "and the" between two NP
s. Plural case is (phraseNP t1) +:+ "and the" +:+ (pluralNP t2)
.
"The" Combinators
ofThe :: NP -> NP -> NP Source #
Inserts "of the" between two NP
s. Plural case is (phraseNP t1) +:+ "of the" +:+ (pluralNP t2)
.
ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Similar to ofThe
, but accepts two functions for the plural case.
inThe :: NP -> NP -> NP Source #
Inserts "in the" between two NP
s. Plural case is (phraseNP t1) +:+ "in the" +:+ (pluralNP t2)
.
inTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Similar to ofThe
, but accepts two functions for the plural case.
the_ofThe :: NP -> NP -> NP Source #
Prepends "the" and inserts "of the". Plural case is "the" +:+ (phraseNP t1) +:+ "of the" +:+ (pluralNP t2)
.
the_ofTheGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Similar to the_ofThe'
, but takes two functions for the plural case.
"For" Combinators
for :: NP -> NP -> NP Source #
Inserts "for" between two NP
s. Plural case is (phraseNP t1) +:+ "for" +:+ (pluralNP t2)
.
forGen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Same as for'
, but takes two functions for the plural case.
"Of" Combinators
of_ :: NP -> NP -> NP Source #
Inserts "of" between two NP
s. Plural case is (phraseNP t1) +:+ "of" +:+ (pluralNP t2)
.
of_Gen :: (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Same as of_
, but takes two functions for the plural case.
of_GenGen :: (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> (NP -> Sentence) -> NP -> NP -> NP Source #
Same as of_
, but takes two functions for the singular case and two for the plural case.