Skip to content

Commit

Permalink
#3252 Sentence Reworking (for the Projectile Example, Part 2)
Browse files Browse the repository at this point in the history
Re-work some existing sentences by inserting defined concepts inside.
  • Loading branch information
daijingz committed Sep 14, 2024
1 parent bc1b6c3 commit 380280e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions code/drasil-example/projectile/lib/Drasil/Projectile/Body.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ mkSRS = [TableOfContents,

justification, scope :: Sentence
justification = foldlSent [atStart projectile, phrase motion, S "is a common" +:+.
phraseNP (problem `in_` physics), S "Therefore, it is useful to have a",
phraseNP (problem `in_` physics), S "Therefore" `sC` S "it is useful to have a",
phrase program, S "to solve and model these types of" +:+. plural problem,
S "Common", plural example `S.of_` phraseNP (combineNINI projectile motion),
S "include" +:+. foldlList Comma List projectileExamples,
S "The document describes the program called", phrase projectileTitle,
S ", which is based on the original, manually created version of" +:+
S ", which is based" `S.onThe` S "original, manually created version of" +:+
namedRef externalLinkRef (S "Projectile")]
scope = foldlSent_ [phraseNP (NP.the (analysis `ofA` twoD)),
sParen (getAcc twoD), phraseNP (combineNINI projectile motion), phrase problem,
Expand Down Expand Up @@ -216,13 +216,13 @@ sysCtxUsrResp :: [Sentence]
sysCtxUsrResp = map foldlSent [[S "Provide initial", pluralNP (condition `ofThePS`
physical), S "state" `S.ofThe` phrase motion `S.andThe` plural inDatum, S "related" `S.toThe`
phrase projectileTitle `sC` S "ensuring no errors" `S.inThe` plural datum, S "entry"],
[S "Ensure that consistent units are used for", pluralNP (combineNINI input_ Doc.variable)],
[S "Ensure that consistent units" `S.are` S "used for", pluralNP (combineNINI input_ Doc.variable)],
[S "Ensure required", namedRef (SRS.assumpt ([]::[Contents]) ([]::[Section]))
(phrase software +:+ plural assumption), S "are appropriate for any particular",
phrase problem, phrase input_ `S.toThe` phrase software]]

sysCtxSysResp :: [Sentence]
sysCtxSysResp = map foldlSent [[S "Detect data type mismatch, such as a string of characters",
sysCtxSysResp = map foldlSent [[S "Detect data type mismatch" `sC` S "such as a string of characters",
phrase input_, S "instead of a floating point number"],
[S "Determine if the", plural input_, S "satisfy the required",
pluralNP (physical `and_` softwareConstraint)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ reviewEqns

reviewContextP2
= foldlSP
[S "Only two of these", plural equation, S "are independent, since the third" +:+
[S "Only two of these", plural equation, S "are independent" `sC` S "since the third" +:+
phrase equation, S "can always be derived from the other two"]


Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ outputValues = cic "outputValues" outputValuesDesc "Output-Values" funcReq
verifyParamsDesc, calcValuesDesc, outputValuesDesc :: Sentence
verifyParamsDesc = foldlSent [S "Check the entered", plural inValue,
S "to ensure that they do not exceed the" +:+. namedRef (datCon [] []) (plural datumConstraint),
S "If any of the", plural inValue, S "are out of bounds" `sC`
S "If any" `S.ofThe` plural inValue `S.are` S "out of bounds" `sC`
S "an", phrase errMsg, S "is displayed" `S.andThe` plural calculation, S "stop"]
calcValuesDesc = foldlSent [S "Calculate the following" +: plural value,
foldlList Comma List [
Expand Down

0 comments on commit 380280e

Please sign in to comment.