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

Language.Drasil.Development

Description

Developing the expression language in Drasil. Re-export many things to simplify external use.

Synopsis

Development.Sentence

toSent :: NPStruct -> Sentence Source #

Translate from NPStruct to Sentence

NounPhrase

class NounPhrase n a | n -> a where #

Minimal complete definition

phraseNP, pluralNP, sentenceCase, titleCase

Methods

phraseNP :: n -> NPStructG a #

Retrieves singular form of term. Ex. "the quick brown fox".

pluralNP :: n -> PluralFormG a #

Retrieves plural form of term. Ex. "the quick brown foxes".

Instances

Instances details
NounPhrase (NPG a) a

Defines NP as a NounPhrase. Default capitalization rules for proper and common nouns are CapFirst for sentence case and CapWords for title case. Also accepts a Phrase where the capitalization case may be specified.

Instance details

Defined in Drasil.NaturalLanguage.English.NounPhrase

Methods

phraseNP :: NPG a -> NPStructG a #

pluralNP :: NPG a -> PluralFormG a #

sentenceCase :: NPG a -> (NPG a -> NPStructG a) -> Capitalization a #

titleCase :: NPG a -> (NPG a -> NPStructG a) -> Capitalization a #

NounPhrase.Core

type NPStruct = NPStructG Symbol Source #

Synonym for NPStructG filled with a Symbol the version used outside this file.

sdep :: Sentence -> Set UID Source #

This is to collect symbolic UIDs that are printed out as a Symbol.

lnames :: Sentence -> Set UID Source #

Generic traverse of all positions that could lead to reference UIDs from Sentences.

lnames' :: [Sentence] -> [UID] Source #

Get reference UIDs from Sentences.