Articles of values

#1

Two questions about values and articles:

1. Article output for values

How do we get the right [a/an] indefinite article for a value, as in:

A picture is a kind of value. The pictures are landscape, portrait, abstract, nude, still life, and blank.

... say "You have already drawn [a picture of the second noun] on [the second noun]." instead.

“[a picture of the second noun]” basically gives the value without any articles, as in:

I got to this solution, but I am open for more suggestions:

A picture is a kind of value. The pictures are landscape, portrait, abstract, nude, still life, and blank.

A picture has some text called ind-article. The ind-article of a picture is usually "a". The ind-article for abstract is "an".

A picture has some text called def-article. The def-article of a picture is usually "the".

2. Article input for values

For an action applying to a value, the parser does not seem to understand an article before the value. Am I suppose to provide articles in the “understand” parts of the action definition? Example:

A picture is a kind of value. The pictures are landscape, portrait, abstract, nude, still life, and blank.

Drawing it on is an action applying to one picture and one thing. Understand "draw a/an/the/-- [picture] on [something]" or "sketch a/an/the/-- [picture] on [something]" as drawing it on.

Thanks

0 Likes

#2

Something I’ve done in a semi-similar situation is to define the ‘property’ instead as (off-stage) things, and then use relationships. I don’t know if it’d work in your case but you could play around with it. One limitation I’ve found in my case is that then I can’t (or haven’t yet found a way) to understand that relationship as the thing, in the way you can understand a property as a thing.

0 Likes

(matt w) #3

You can understand things by their relationships–check out §17.16 of Writing with Inform.

For the original thing, you can define a custom phrase to do it:

[code]Studio is a room.

A picture is a kind of value. The pictures are landscape, portrait, abstract, nude, still life, and blank.

A canvas is in the Studio. The canvas has a picture. The picture of the canvas is blank.

Drawing is an action applying to one picture. Understand “draw [picture]” as drawing.

Instead of drawing:
if the picture understood is blank:
say “When you try to think of how to do that, you draw a blank.”;
otherwise if the picture of the canvas is not blank:
say “You have already drawn [a picture of the canvas] on the canvas.” ;
otherwise:
say “You draw [a picture understood] on the canvas.”;
now the picture of the canvas is the picture understood.

To say a (image - a picture):
if the image is abstract:
say “an [image]”;
otherwise:
say “a [image]”.[/code]

This code is all kinds of mess, for instance you’d want to break the Instead up into a few separate rules probably, and you may want to test whether the first letter of the image is a vowel rather than just hand-coding in the one that starts with a vowel… but hopefully the critical part is clear enough.

0 Likes

#4

…You mean the chapter helpfully entitled “Understanding things by their relations”? Where’s a head-slap smiley when you need one? Thank you!

0 Likes