-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spanish BUG: Syntaxes with "de" Not Working! #43
Comments
Possible Workaround via Noise WordsI was thinking that this problem could be solved by declaring "de" (and its variations, if any) as a NOISE WORD, so its stripped by the parser. So this would be useful, regardless of the use of "de" in such commands is optional or mandatory, for either input would match the same syntax (i.e. without "de": But this is only doable if "de" is never used on its own in syntaxes where it might play an important role — but this is something that only @Rich15 can confirm, since I have no idea if "de" can be used as a preposition on its own, or whether the term has other roles in the Spanish grammar. |
That's good news. We can just delete those alternative syntaxes.
Does this mean that there are also other uses of "de/del" where it actually is needed? |
Just to make sure we can safely delete all the syntax variants with the extra 'DE', I'm listing all of them here. I think I understand the problem, i.e. that some people might use the extra 'de' in everyday parlance, although it's not required grammatically — in Italian we have many similar examples. It's always a tuff decision in IF: should we cover everyday language usage, or just stick to proper grammar? Usually the latter prevails, except for well established norms of speech that are so widely accepted that most players will naturally attempt their use in IF commands. As long as dropping the 'de' from the SYNTAX doesn't result in an incorrect form, I think it's best to just drop it, since it's not readily supported in ALAN, after all players tend to quickly adapt to IF and use the shortest commands possible (to type faster) and are generally resilient when it comes to learning how the game commands work. (but I sill think that it's worth investigation the original problem of why these double prepositions don't work in ALAN, or at least to document it in The ALAN Manual, if this is how SYNTAXes are supposed to work). Occurrences of 'DE' in Library SYNTAXesThere are 8 alternative SYNTAXes, across 3 library modules, for a verb variant with "de":
@Rich15, I just wanted to make sure that NONE of the above is a correct syntax (as opposed to its variant without 'DE') before deleting them from the library for good. |
Sorry for not keeping up with the lightning speed you guys keep on the Spanish library ;-) But I'm really happy that is happening. There is no principal problem with defining those two syntaxes and getting them to work, and your guesses about multiple words in between parameters are incorrect. A simple and clean test with only those syntaxes shows that. So what I guess is happening here is that "de" is used both as a preposition (a "between parameters" word) and something else, like a synonym or an adjective. An adjective would be my guess since you say "considers it to be part of the parameter name". Some of the combinations of word usages are allowed, some others are prohibited by the compiler. Since the command interpreter has no backtracking, once it selects one of the usages for a word, it has no way of reverting that. There is already a request for allowing, and being able to handle, more of these "dual word usages" including some discussion in one of the repositories (failed to find it right now, it should be in the alan-repo...). |
Thanks @thoni56!
Then I'll try to find out what's interfering with this. As far as I can remember, there's only 'DES' as SYNONYM of 'DE', and I remember having searched the whole library for occurrences of 'DE' and didn't find anything else. Maybe the problem is in the Vampiro adventure then, which is what I used for testing. I'll update you on this once I've found out more. |
SYNTAXes with "de"
There are two sentences where using "de" is incorrect:
The rest are correct, and they wouldn't make sense if "de" was omitted. |
Delete the following alternative syntaxes which are not linguistically correct (see #43): - `hablar.i` — `hablar_con` (`hablar con (act) sobre de (tema)!`) - `poner.i` — `poner_sobre` (`poner (obj1) sobre de (obj2)`)
DONE! I've deleted them in
So you think that the syntax variations without 'DE' maybe were added in pALANte because the full syntax wasn't working? I've marked the remaining 'de' syntaxes as requiring to be tested if they work; but if there are verbs where the 'DE' in mandatory, we should also annotate this so that if we manage to solve the problem we can drop the alternative syntaxes without 'DE' — i.e. if these are really bad Spanish, and unless it's an IF custom to support them for the sake of brevity. E.g. I noticed that for the
but that there are also briefer variations:
I wonder if these are there because they are all acceptable from a linguistic point of view, or whether it's just about supporting shorter versions of the verb for practical reasons, i.e. to allow players less typing during game (which is probably a good thing). |
I think they are there because they're shorter and allow less typing from the players, even when they wouldn't make sense in a real conversation. And I want to clarify that I did mark the two SYNTAXes in
From a linguistic perspective, they are totally wrong, but as they're probably just shorter commands to make things easier for the player, I think we should keep them. |
I agree. We might want to mark all occurrences of similar shorthand syntaxes (not only for DE, but everywhere) with some standard annotation command (e.g. |
Delete the following alternative syntaxes which are not linguistically correct (see #43): - `hablar.i` — `hablar_con` (`hablar con (act) sobre de (tema)!`) - `poner.i` — `poner_sobre` (`poner (obj1) sobre de (obj2)`)
Delete the following alternative syntaxes which are not linguistically correct (see #43): - `hablar.i` — `hablar_con` (`hablar con (act) sobre de (tema)!`) - `poner.i` — `poner_sobre` (`poner (obj1) sobre de (obj2)`)
Delete the following alternative syntaxes which are not linguistically correct (see #43): - `hablar.i` — `hablar_con` (`hablar con (act) sobre de (tema)!`) - `poner.i` — `poner_sobre` (`poner (obj1) sobre de (obj2)`)
Delete the following alternative syntaxes which are not linguistically correct (see #43): - `hablar.i` — `hablar_con` (`hablar con (act) sobre de (tema)!`) - `poner.i` — `poner_sobre` (`poner (obj1) sobre de (obj2)`)
@thoni56 and @Rich15, I've come across a problem with compound prepositions in Spanish verbs. E.g. the SYNTAX for "put (obj1) on (obj2)" has two variations:
one with and another without "de". The same applies for many other prepositions of the type "on top of", "behind", "under", "near", etc.
The problem is that when the player tries to use the variation with "de" the parser fails to recognize the command replying that "there is no de obj2". E.g.
whereas using the version without "de" works fine:
I've tried swapping place between the two syntaxes (so the longer one would become the default), or enclosing within quotes
'sobre de'
, or individually'sobre' 'de'
, but to no avail.The problem seems that ALAN doesn't expect more than one word (token) between parameters, and if it finds one it considers it to be part of the parameter name (i.e. as if it was an adjective + name).
So far, the only solution that comes to my mind would be to add a name variant containing "de" for each object that is a candidate for such verbs, e.g.
I haven't tried that yet (will do), but it seems a rather ugly workaround and a desperate attempt to save the situation, rather than a real solution. Even if it worked, it should be done on every
object
instance (or even actors) since the player might attempt such VERBs that contain a "de" on any object really, not just does that we want to be usable with such verbs!@thoni56, any thoughts on this? why it's happening, and if there are possible solutions?
@Rich15, how bad is it in the Spanish language to omit the "de" in such commands? Is it something that players can cope with, or does it feel totally unnatural?
I noticed that all these type of verbs contain the SYNTAX variant without "de" (as the default), but now I'm not sure whether this was done because of the above problem, or because both forms are acceptable (at least in terms of IF playing, where less typing is more).
If there's no way to make the SYNTAX variants with "de" working, we should just delete them.
References
The text was updated successfully, but these errors were encountered: