Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

Automate Table of Abbreviations and Acronyms

Open Mornix opened this issue 6 years ago • 1 comments

Related #698.

Currently usedinfodb is used to extract acronyms to print. https://github.com/JacquesCarette/Drasil/blob/f43b3c189ac90af4681e5f1250077817a0f2e86a/code/drasil-docLang/Drasil/DocumentLanguage.hs#L275-L276

And the items pulled from the usedinfodb are manually populated in the examples.

What are the steps to automate this?

  1. Use the short constructor to construct abbreviations (in the examples) as opposed to getA. The short smart constructor maintains chunk information of what is being abbreviated.
  2. Write a plate extension for sentencePlate https://github.com/JacquesCarette/Drasil/blob/f43b3c189ac90af4681e5f1250077817a0f2e86a/code/drasil-docLang/Drasil/ExtractDocDesc.hs#L180 to extract the abbreviations from Sentence constructors.
  3. Expand renderRef from using raw strings to Sentence (makes reference pretty names more flexible too). Ensure renderRef embeds the chunk of the abbreviation (and not just the string). ConceptInstance already does this for renderRef with Deferred. https://github.com/JacquesCarette/Drasil/blob/f43b3c189ac90af4681e5f1250077817a0f2e86a/code/drasil-theory/Theory/Drasil/Theory.hs#L65
  4. Extend the mapping from sentencePlate done in step 2, to extract abbreviations from references.
  5. Lower Table of Abbreviation and Acronym (and really all subsections in RefSec) to a later pass. (As things like Traceability Matrices are generated from the DocDesc, there will likely be references to likely changes section, which wouldn't be present prior to generation of the Traceability Matrix section.
  6. Finally, enable expansion to only lookup terms which have been gathered. https://github.com/JacquesCarette/Drasil/blob/f43b3c189ac90af4681e5f1250077817a0f2e86a/code/drasil-docLang/Drasil/DocumentLanguage.hs#L275-L276

Mornix avatar Jul 03 '19 20:07 Mornix

This was discussed in the Dec 20th meeting (starting at approximately 6:30).

As of right now, _usedinfodb is left as a hack for the Table of Abbreviations and Acronyms, where the terms are manually populated into the _usedinfodb. We decided that we would hold off on working on this until a bit later when #2873 or similar is finished. The ideal solution is scanning the chunk database for chunks that are used in the softifacts (without scanning the generated contents), and then pulling the abbreviations and acronyms automatically.

balacij avatar Jan 25 '22 17:01 balacij