Adaptive text, in spanish translation WIP

Hi!
We are working with this new feature (tense and viewpoint) in 6L02.
Here the ‘problem’:

In spanish, the natural form to say:

report jumping rule response (A) is "[Tu] [saltas] en el sitio." [[We] [jump] on the spot.] 

Is: (for present tense)

1PS: "Salto en el sitio."
2PS: "Saltas en el sitio."
3PS: "Él salta en el sitio."

i.e. the pronouns for 1P (“Yo”) and 2P (“Tu”) are not necessary (we can use them, but the text will not be ‘natural’). Just print the verb in those cases. And the same with plural cases.

We can write the ‘To say Tu’ code that just print nothing for 1P and 2P. But the problem is :how can I print (in those cases) the next word (the verb) with first letter in upper case?

For now, we use Text Capture by Eric Eve to manipulate the final text before print it.

Something like:

[spoiler][code]report jumping rule response (A) is “[Tu] [saltas] en el sitio.[FLU]” [[We] [jump] on the spot.]

to say FLU:[first char in upper case]
stop capturing text;
say “[captured text]” in sentence case.

To say Tu:
now the prior named object is the player;[ object’s identity is a value stored in “prior named object”]
if the story viewpoint is first person singular:
start capturing text;
if the story viewpoint is second person singular:
start capturing text;
if the story viewpoint is third person singular:
if the player is male:
say “Él”;
otherwise:
say “Ella”;
if the story viewpoint is first person plural:
start capturing text;
if the story viewpoint is second person plural:
start capturing text;
if the story viewpoint is third person plural:
if the player is male:
say “Ellos”;
otherwise:
say “Ellas”.
[/code][/spoiler]

But perhaps there is another (built-in easy) way to do this stuf.

Any suggestions?

Thanx in advance.

INFSP Team

I don’t know how you’re handling the verb substitutions, but it seems that you could handle this with a single global flag. Inform can now capitalize all text types so text capture should be unnecessary.

[code]Madrid is a room.

The report jumping rule response (A) is “[Tu][saltas] en el sitio, [tu][saltas].”

Uppercase verb is a truth state that varies.

To say tu:
now the prior named object is the player;
if the story viewpoint is third person singular:
if the player is male:
say "él ";
otherwise:
say "ella ";
if the story viewpoint is third person plural:
if the player is male:
say "ellos ";
otherwise:
say "ellas ";
now uppercase verb is false.

To say Tu:
say “[tu]” in sentence case;
if the story viewpoint is not third person singular and the story viewpoint is not third person plural:
now uppercase verb is true.

To say saltas:
let verb form be text;
if the story viewpoint is first person singular:
now verb form is “salto”;
if the story viewpoint is second person singular:
now verb form is “saltas”;
if the story viewpoint is third person singular:
now verb form is “salta”;
[… and so on]
if uppercase verb is true:
say verb form in sentence case;
otherwise:
say verb form.[/code]

Hi! I’m working on the italian translation, and I solved your problem more or less like Juhana said.

Anyway, now I have a problem in managing responses like this:

list writer internal rule response (V) is “[regarding list writer internals][are]”.

Have you already translated this response in spanish?

Thank you in advance!

Thanx Juhana for the response.

The fact is that I do not create the verb substitutions, but I7 does (internally and silently); according to preform spanish rules that our Spanish extension implement. In this case I7 uses the production that match all -ar regular verbs (like ‘cantar’). That’s the cool part of the new feature: You teach to I7 how conjugate a subset of dozen verbs with just a few preform lines.

But I can’t see the way to produce first capital char in a automatic verb conjugation.

Ciao Leo!

You can see our work in github.
Also, for that subset, you can test it with function explained in Doc 5.5 Text with lists.

That response seems to be used by the “[is-are list of…” phrase and the “you-can-also-see” rule. The problem with that response, at least in Spanish, is that it can be used in English with multiple meanings but maintaining the same verb:

"The winners of the contest are [is-are list of winners]." "You can see a table (on which [is-are list of things on table]."
For the first response, in Spanish we could use the verb “ser”, so the response would look like:

list writer internal rule response (V) is "[regarding list writer internals][es]".
"Los ganadores del concurso son a, b y c."

But for the second phrase, we could use “estar”, “haber” or “encontrar”, but it sound more natural with the impersonal form of “haber”.

list writer internal rule response (V) is "[regarding list writer internals][hay]".
"Puedes ver una mesa (sobre la que hay una a, b y c)."

If we use the second form of the response, the standard messages seems correct but authors will have to use another phrase for listing with the verb “ser”.

Thank you very much! I visited the github and it seems that your WIP “Spanish Language” is derived from “French Language”, that I can’t find anywhere, at least until a few days ago. Where did you download it? (To develop the “Italian Language” extension will be very useful to read also the original French extension)
Thank you in advance!

I have a similar problem in “Italian Language”, since I passed to the automatic verb conjugation, while I used the Juhana method before. Have you found a solution?

I use the ‘solution’ mentioned above (first post), using post-processing workaround.

Thank you. It’s a clever workaround. However, in a more advanced support to non-English languages, verbs written with the first letter in upper case are a must. I hope that future release will support them.

Came across this thread while trying to solve this problem myself. As a writer, I sometimes favour clipped English sentences, which begin with, for example: ‘Came across this thread while…’ etc.

For the reasons outlined above (and perhaps because the designers of i7 don’t read poetry?? j/k) a writer attempting to start an English sentence with an adaptive verb will currently face difficulty with Inform 7. Starting from the advice above (and using 6L38 instead of 6L02, which I’m not sure makes a difference), I was able to solve the problem generally for simple verbs without using any post-processing or extensions. I did like so…

To say Cap (V - a verb):
     say "[adapt V]" in sentence case;

To wait is a verb.

Before waiting [or whatever rule you are using this in]:
     say "[Cap the verb wait] for a while. Nothing [happen]." instead;

This works in descriptions and other text properties, too - but it only works for simple verbs. It fails to compile for compound constructions such as ‘[might look]’ or ‘[can’t are]’ (yeah that one looks mighty odd in ‘adaptive tense’ but it’s the only way I can find to adaptively produce the phrase ‘can’t be’, which I seem to use a lot).

It also fails for negatives like ‘[Are not]’ (apparently ignoring the ‘not’) and ‘[Aren’t]’ (which fails to compile altogether).

I only had one such failure out of about 20 times I wanted to start a sentence with an adaptive verb, so rather than implement complex post-processing just for a single edge case, I cursed the gods of Inform and rewrote that one sentence. So, sorry it’s not a complete solution, but this solved 95% of my problem w/o further hassle.

Let’s hope that when this facility is fixed for other languages, it’s done in such a way that it applies to English, too, for us grammatical degenerates. (Like James Joyce, Virginia Woolf, Russell Hoban…)

[ EDIT: Simplified the code a bit, since it seems ‘[regarding the player]’ isn’t necessary — ‘[adapt V]’ always follows the viewpoint of the player, which also means that this trick only works for verbs which accord with the player. That happened to cover all of my uses. In order to also cover non-player subjects I’d probably have to encode their plurality into a narrative viewpoint variable to use in an ‘adapt V from (narrative viewpoint)’ statement, and I don’t know how to do that, yet. ]

[ EDIT 2: Here’s a little hackaround that might work…

To say Cap (V - a verb) via (T - a thing):
     say "[if T is plural-named][adapt V from the third person plural][else][adapt V from the third person singular][end if]" in sentence case;

To smash is a verb.

Before waiting:
     say "[Cap the verb smash via the troll] the rock down. On your head!";
     end the story;

…but I haven’t tested this or anything. I also just realised that I could write an ‘Cap & neg’ version that uses ‘negate’ instead of ‘adapt’ to access forms like ‘Are not’ if I need to. ]