Sorry for my lack of good explanation. And thanx for your interest for help. I appreciate that.
I’ll try to explain more (including my own interpretation of some facts):
I try to improve the develop experience for the game author in inform7.
LanguageIsVerb () is a kind of hook that gives to the translator a chance to replace an uknown word with a know one from the dictionary. This can be useful when dealing with some language peculiarities, like in spanish.
In the spanish verbs, imperative is not equal to inifinitive. There are differences.
And, it is a tradition that a player use them interchangeably to write commands in the game/history.
language action infinitive imperative
english opening open open
spanish abrir abre
english jumping jump jump
spanish saltar salta
The spanish player could write:
>abre la caja (open the box) [imperative form]
And some turns later, he could write:
>abrir la caja (open the box) [infinitive form]
To avoid the need for a game author to define inifinive and imperative forms of every verb for the game, we (the Spanish Extension) use LanguageIsVerb().
So, the author just define the imperative form of the verb and the parser can handle the infinitive(Ej: ‘salta’ for jump: Understand “salta” as jumping.).
We use LanguageIsVerb() spanish library since inform6 era (for more than 20 years) It is a stub function in factory library (english library) and could be used (or not) for translators. Of course, the code must be provided by the translator language extension.
You can inferred its role looking in the inform factory code. I’m afraid threre is no documentation.
In few words, with LanguageIsVerb you can say to the main library parser “hey, this word has a replacement and it could be a verb!”, before de main parse algorithm continues with compass and talk-to-character stages. (see Parser Letter B)
The output of LanguageIsVerb () could be:
verb_word = LanguageIsVerb(buffer, parse, verb_wordnum)
** verb_wordnum ** is a number that points which word in **parser** is not recognized by the parse
** buffer ** is the special array that contains all the chars that the player has wrote
verb_word = 0: LanguageIsVerb can't found a replacement to serve (english default output)
verb_word not 0: is a dictionary address of a word, could be a verb (it depends of flag #dict_par1 bit 1 later)
the parser algorithm will decide how manage that output.
There are a two groups of spanish verbs:
“regular” spanish verbs, just follow an easy patter: you make the imperative removing the last character (saltar → salta).
“irregular” spanish verbs, that not folllow an easy pattern when are used in imperative form.
For the first group there is no problem, it resolved internally by the spanish extension without the participation of the game author.
For the second is required a kind of strategy to provide a dictionary synonymous for a verb with participation of the game author. (a Table fits well I think).
Table of Irregular Verbs
So I feed an I7 rule with my text-string and it gives me the synonymous. Then I seek that synonymous in the dictionary and that’s all.
LanguageIsVerb is the i6-hook that call the I7-rule and receives its result.
But I have problem trying to do that, with the params that I need to send, and with the format/type of them.
Why not just use Understand the command … as …?
Because the incomplete-commands sceneray:
You can see a box and a table here.
What do you want to open?
The parser question need the infinitive form of the verb, but it is using [parser command so far] that takes the verb from the player buffer, and could be in spanish imperative. wrong!
We need to provide the infinitve synounymous in this situation. So, the table will be ok here to.