Hindsight: Thank Goodness I chose to use OOP for my current project
I only vaguely remember how my so-called "second" project for learning OOP evolved into my current "Xpander" project.
I sure am glad though, that I found justification for doing it as an OOP project based on the idea that I will need different instances (a.k.a. different lookup dictionaries) for different situations (a.k.a. different "contexts"). [QAAA = (Query Asked And Answered) = QA3 --> here and here ]
In other words, (Abv = iow ?) thank goodness I'm developing it as an OOP project. The project is too complex to not be an OOP project. [QA3 = here] (Link to first image on the right is here)
Let me "step back" in time a bit. I used to write work-related macros in VBA for MS Word. My two most useful, hot key activated, macros were called "DoThis" and "ConvertThis" (made up names here). For the first macro, I would highlight a text string that was the name of yet another VBA macro and hit a hot key combination. The other macro would then be executed. For the second case, I would highlight a text string that was an abbreviation stored in an abbreviations-to-expansions storing file (basically a dictionary), and then hit another hot key combination. The highlighted text would then be automatically replaced by its expanded substitute.
The current "Xpander" project uses Python to DO/Kill BOTH birds with one stone!
Here is a schematic of the currently planned system (left click to enlarge)
Text that could include Xpander-triggering [P3]'s and/or [P4]'s goes into the left side of the Pipe. If no [P3]'s or [P4]'s, the input gets replicated as was, at the right side output.
If one or more pure [P3] triggers are found, a Dictionary from the leftmost set is selected and used to generate the substitutes. Selection is on the basis of a specified context. The context could be a role the user is currently occupying; for example medical records coder, lawyer, engineer, teacher, etc.
If one or more pure [P4] triggers are found, a Dictionary from the second-from-left set is selected and used to generate the substitutes for the found [P4]'s. Once again, selection is on the basis of a specified context.
If one or more mixed [P4][P3] triggers are found, then two respective Dictionaries from the two sets on the right are each selected and used to specify actions to be performed based on script/macro names preceding the found [P4][P3] sequences. Once again, selection is on the basis of a specified context.
TO BE CONTINUED ...
MORE TO EXPLORE


Comments
Post a Comment