Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does exist a language to speed up text creation upon decisional tree structure( (with conditional branches, choices,...) ?

0 views
Skip to first unread message

Simone Murdock

unread,
Sep 7, 2007, 1:52:12 AM9/7/07
to
I often need to write relations whose structure is roughly similar.
Now I'm using Auto-Hot key to expand some text abbreviations (I write in
editbox of a Delphi program), but it would be better to have a language
to describe a kind of "decisional tree" (with conditional branches,
choices [radio box, check box, "if" structure,...) to obtain a final
text according user decisions.

e.g. in a medical context (in UPPER CASE the resulting text):

Does shoulder ache ? No, Yes (radio-button)
[No] -> NO SYMPTOMS ABOUT SHOULDER
[Yes] -> Can rise arm against resistance ? (radio button)
[No] -> STRONG SHOULDER PAIN WITH LOSS OF FUNCTIONALITY.
[Yes] -> SHOULDER PAIN, BUT ABLE TO RISE OBJECTS.

This is only a small example: I'd like to create more complex decisional
tree (e.g. about different body parts)
....

Does already exist a similar descriptive language text-oriented or have
I to create it ?
(I know Delphi and I could learn Python, but I have no much time).

Thanks for any advice!

Simon
_______________________________________________________

Sperm: To be fastest doesn't imply that you are smartest.
( by Enrique Herranz )

Marco van de Voort

unread,
Sep 7, 2007, 9:16:57 AM9/7/07
to
On 2007-09-07, Simone Murdock <FalselinKsi...@vene.ws> wrote:
> I often need to write relations whose structure is roughly similar.
> Now I'm using Auto-Hot key to expand some text abbreviations (I write in
> editbox of a Delphi program), but it would be better to have a language
> to describe a kind of "decisional tree" (with conditional branches,
> choices [radio box, check box, "if" structure,...) to obtain a final
> text according user decisions.
>
> e.g. in a medical context (in UPPER CASE the resulting text):
>
> Does shoulder ache ? No, Yes (radio-button)
> [No] -> NO SYMPTOMS ABOUT SHOULDER
> [Yes] -> Can rise arm against resistance ? (radio button)
> [No] -> STRONG SHOULDER PAIN WITH LOSS OF FUNCTIONALITY.
> [Yes] -> SHOULDER PAIN, BUT ABLE TO RISE OBJECTS.


Easier to do it like this:

1: Does shoulder ache ?


[No] -> NO SYMPTOMS ABOUT SHOULDER

[Yes] -> [2]

2: Can rise arm against resistance ?

[No] -> STRONG SHOULDER PAIN WITH LOSS OF FUNCTIONALITY.
[Yes] -> SHOULDER PAIN, BUT ABLE TO RISE OBJECTS.


In other words, the number is a label, you start with label 1, and if you
have to go to another label you simply add the

- Put this in a textfile, and have a delphi app read it line for line.
- if the line starts with a label, read two extra lines (yes and
no), store them in an object and put them in a tstringlist with the label
as string (iow strl.addobject(labelname,myobject); )
- skip empty lines.

The GUI will like this: Have a combo box, or a few buttons. As said we
assume label 1 is the start, do a ind:=strl.indexof('1') and get the
corresponding object (myobj:=TMyObjecType(strl.objects[ind]); ).

Now update the gui with the data in the classe. When a user selects something with an end
choice, simply show the text, otherwise determine the number of the next
label, and do the next iteration.

Should be doable in an hour or so.

Simone Murdock

unread,
Sep 7, 2007, 4:26:49 PM9/7/07
to
On Fri, 7 Sep 2007 13:16:57 +0000 (UTC), Marco van de Voort
<mar...@stack.nl> wrote:

>Easier to do it like this:

What a elegant method (and seems born to be done also in Python)!

Well, I had to read it 4-5 times to understand it fully.... :-)
(I couldn't do it this way by myself, thanks!)

Marco van de Voort

unread,
Sep 8, 2007, 4:08:44 AM9/8/07
to
On 2007-09-07, Simone Murdock <FalselinKsi...@vene.ws> wrote:
> On Fri, 7 Sep 2007 13:16:57 +0000 (UTC), Marco van de Voort
><mar...@stack.nl> wrote:
>
>>Easier to do it like this:
>
> What a elegant method (and seems born to be done also in Python)!

No elegant method deserves the humiliation to be done in Python :_)

0 new messages