alan-if / alan-docs

Alan IF Documentation Project

Home Page:https://git.io/alan-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gender Support in ALAN German and Swedish?

tajmone opened this issue · comments

@thoni56, I'm working on Appendix G: Localization and I need some clarifications about ALAN native support for German and Swedish, for the Manual doesn't say much on this.

Unlike English, the German language features grammatical gender (masculine, feminine, and neuter). For the Italian library, I had to go to great lengths in order to introduce support for mansculine and femmine gender (accordance of articles, prepositions, adjectives, etc.), so I guess that being able to actually use the German language might require even more work in that direction (having looked at G-TADS, the German library for TADS3, I know it's very complex).

I guess that ALAN native support for German must be very baisc, and mainly limited to the core message. But why isn't there some kind of German library out there? I would have expected to find at least a core grammar module to enable gender support and initialization for German.

Swedish supports common and neuter gender, but I have no idea what its grammatical implications are in terms of articles, prepositions, etc. But, again, I can't see any core Alan library for Swedish either.

Could you clarify the situation to me?

  • How are adventures in German and Swedish created without some extra modules for gender support?
  • Are there separate manuals for German and Swedish?
  • Any example adventures found in the wild?
  • Articles and tutorials?

Since German and Swedish are the two languages natively suported in Alan, along with English, it might be worth mentioning them in the Manual (e.g. in Appendix G: Localization).

"Native" support for Swedish and German is, as you suspect, on the basic level. There is no support, per se, for gender, or changes of word forms, that give author support on the level that the current library authors, starting with Anssi and yourself following, is striving for.

Remember that Alan started out without library, and that the first iteration of a library was also basic with less "natural language and grammar" support and focusing on "functional" support.

The "Native" support is limited to

  • native translations of the built in messages
  • translation of built-in words (articles, pronouns and conjunctions)

These can be found in msg.c and wrd.c of the compiler.

The think was that the author actually did not need to have that support because there was no "library-layer" between him/her and the Alan run-time. E.g. in Swedish we use double markers for definite form:

den röda stolen

(the red chair) where both "den" and the ending "en" on "stol" signals definite "article" (there should be an English term for this but I can seem to find a translation now...).

WARNING Swedish example, and Alan-archeology, coming up:

So what in English would be

There is a red chair here.
> take the red chair
You take the red chair.

operating on the Alan object

The red_chair Name red chair...

In Swedish you have to give your chair multiple names to cater for but the indefinite mentioning in the description, and the definite reference in the player input, as well as reporting the result in definite form. Again, this works if you are "close to the metal":

The red_chair Name röd stol Name röda stolen
...
    Verb take ... "Du tar den röda stolen."

giving

Det finns en röd stol här.
> ta den röda stolen
Du tar den röda stolen

This worked for a while, until the pull towards more general verbs made the explicit string in the verb impossible.

The next step was the birth of the Articles and Forms clauses for objects. With them you could give explicit indefinite, definite, and negative articles and forms, and also the pronouns. Combined with the feature of specifying which form you wanted it fulfilled all the needs for building Swedish and German adventures. At least at the level of sophistication and complexity required at the time.

Again, it would be interesting on doing a deep-dive into what gap there is between the features described above and what the current major libraries need.

Very interesting. Here there's a lot worth mentioning in App G. Localization, for right now there is a cloud of mistery around German and Swedish support (although natively supported). Probably App G. will end up containing general advise on implementing grammar constructs that are useful for all sort of non-English languages (German included).

I think that it would be useful to see a German grammar core module (similar to the one I've created for Italian) to offer basic support for person, number and gender, but without being a library (i.e. no verbs nor world-building classes being defined, just the basic language support).

Alan is the easiest system to implement adventures in new language, exactly because you don't have any libraries to "fight with" (e.g. in Inform7 Italian almost a third of the code deals with suppressing the English defiinitions, resulting in a huge bloat). Also, Alan is flexible for the same reasons.

The Alan evolution part is also very interesting — also, very little is available on Alan history, which is a pity.

E.g. in Swedish we use double markers for definite form:

den röda stolen

(the red chair) where both "den" and the ending "en" on "stol" signals definite "article" (there should be an English term for this but I can seem to find a translation now...).

Possibly they are just called definite article and definite suffix, but there might other terms too when considering other factors beside specificity. From Wikipedia » Swedish:

The masculine and feminine genders were later merged into a common gender with the definite suffix -en and the definite article den, in contrast with the neuter gender equivalents -et and det.

Alan Potential for i18n

Localization is a topic worth investing on, for I see a huge potential in Alan when it comes to i18n — and I really hope that my Italian grammar module might trigger some interest in that direction.

Other IF systems have been ported to various languages, but most of them require a huge effort because their built-in library needs to be translated too. In fact, TADS3 has been ported only to German (G-TADS) so far, because of its huge standard library (over 30.000 lines of code!).

The Italian module that handles the definitions of the grammar and initialization of all game instances is just a few hundred lines (mostly due to nested branching conditions, no lengthy lines overall). So, I'm quite confident that this might attract the attention of many IF authors who'd like to see an IF system in their locale, especially for languages which aren't covered by any IF authoring tool right now.

But we need to also search the topic from the grammar/linguistic side too, to get a good overview of how the different languages handle this, and gather some terminology to discuss it. Graham Nelson did a great job on this in his Inform Designer's Manual (aka DM4).

Mixed Annotations

Since localization of Alan is an important topic, I'll start to gather some notes and links on the topic. For the moment I'll paste them here, but in the future we might include them in the Wiki, and even in the Manual (App G. Localization, or the Glossary).

Grammatical gender manifests itself when words related to a noun like determiners, pronouns or adjectives change their form (inflect) according to the gender of noun they refer to (agreement). The parts of speech affected by gender agreement, the circumstances in which it occurs, and the way words are marked for gender vary between languages. Gender inflection may interact with other grammatical categories like number or case. In some languages the declension pattern followed by the noun itself will be different for different genders.

Useful Links

The Inform Designer's Manual (by Graham Nelson, 4th Ed., 2001):

Wikipedia: