drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellNone
LanguageGHC2024

Language.Drasil.Development.Sentence

Description

Various helpers for building Sentences from other bits. Really ought to be moved out to (likely) docLang, but is here for now.

Synopsis

All Lowercase

phrase :: NamedIdea n => n -> Sentence Source #

Helper for getting the phrase from a NamedIdea using it's UID.

plural :: NamedIdea n => n -> Sentence Source #

Helper for getting the plural of a phrase from a NamedIdea.

phrasePoss :: NamedIdea n => n -> Sentence Source #

Helper for getting the possesive cases from the term of a NamedIdea.

Singular possesive function

pluralPoss :: NamedIdea n => n -> Sentence Source #

Helper for getting the possesive cases from the term of a NamedIdea.

Plural possesive function

Capitalize First Word

atStart :: NamedIdea n => n -> Sentence Source #

Helper function for getting the sentence case of a noun phrase from a NamedIdea.

Singular sentence case.

atStart' :: NamedIdea n => n -> Sentence Source #

Helper function for getting the sentence case of a noun phrase from a NamedIdea.

Plural sentence case.

Capitalize All Words

titleize :: NamedIdea n => n -> Sentence Source #

Helper function for getting the title case of a noun phrase from a NamedIdea.

Singular title case.

titleize' :: NamedIdea n => n -> Sentence Source #

Helper function for getting the title case of a noun phrase from a NamedIdea.

Plural title case.

from NPStruct to Sentence

toSent :: NPStruct -> Sentence Source #

Translate from NPStruct to Sentence

Short Form (lowercase)

short :: Idea c => c -> Sentence Source #

Get short form (if it exists), else get term of an Idea. Uses the UID of the Idea in a Ch Sentence constructor to get the short form using getA. getA may return Nothing, in which case lookupS uses the term, where lookupS is the main helper for looking up the short form of a Ch Sentence.

Introduce with Abbreviation

introduceAbb :: Idea n => n -> Sentence Source #

Introduce a noun phrase and its (parenthesized) abbreviation.

introduceAbbPlrl :: Idea n => n -> Sentence Source #

Introduce a plural noun phrase and its (parenthesized) abbreviation.