The Language Barrier. How to code it realistically.

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Delerak



Joined: 17 May 2005
Posts: 49
Location: Tampa

PostPosted: Sat Aug 01, 2009 6:31 am    Post subject: The Language Barrier. How to code it realistically. Reply with quote

I had a discussion recently on aim about languages in RPI muds and how they aren't coded realistically. We came to the solution that the only way it would work better than it already does would be to use dictionaries. Right now RPI's pretty much just scramble the languages, or don't allow you to understand the language at all. I think these are outdated methods and with the extreme jump in hard-drive sizes over the past few years what's to stop a mud from using translator dictionaries to code in real-time language translations?

For example let's say we have German as a base language for the Germanic race on a mud. The pfile is loaded with German at 100%. So this pfile has 100% access to the german-german dictionary in the database for the mud.

Now we'd need certain variables for other languages. Like French, English, etc. So maybe each one is hidden from view on the skill list and reads at 0% unless they hear a word. For each word they hear a certain amount of times it might add that word to his pfile and that would increase the skill by .00001% or whatever the decimal would be for the amount of words. The Second Edition of the Oxford English Dictionary contains full entries for 171,476 words in current use. So we would probably need a large database to translate English to German and German to English so that the mud translates it correctly.

Anybody think this possible? Rough estimates put the size of such a database and the pulling of the data at such a high number (several hundred gigabytes worth if not terrabytes) that it's probably not possible to do in a short amount of time much less code a system where the mud pulls the correct words and such.

Thoughts?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Sat Aug 01, 2009 3:18 pm    Post subject: Reply with quote

Translations are really not that easy. Aside from the fact that individual words can have multiple meanings, there's also the whole grammar thing. Here's the first paragraph of your post, translated into German using Yahoo Babel Fish, with the result then translated back into English:

I had a discussion recently on a goal over languages into the RPI Schlammen and like her aren' t coded realistically. We came to the solution the fact that the only way, which would work it better, than does it already should dictionaries to use. At this moment RPI' s-quite exactly straight hunts the languages or don' t permit you to understand the language at all. I think that these outdated methods are and with the extreme leap in sizes during the last years what' harddrive; s to stop to a mud of the application of the translator dictionaries in order to code in real time language translations?

Another issue is that I can speak German. My written German isn't very good, but if other players were talking German around me, I could certainly understand what they said, even if my character didn't speak German. I would have to pretend I didn't know what people were saying, even if two people standing right beside me were discussing how best to murder me.

I think I honestly prefer the scrambled output approach you mentioned. You could even properly translate a handful of common words if you wanted to make it sound a bit more realistic, or maybe translate a percentage of the words based on the skill of the listener (even translating single syllable words first, so that people could communicate more easily using simple words). But a full translation would be a huge amount of work, and in my opinion the end result would be undesirable if you're trying to keep IC and OOC skills separate.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Delerak



Joined: 17 May 2005
Posts: 49
Location: Tampa

PostPosted: Sat Aug 01, 2009 3:25 pm    Post subject: Reply with quote

I much prefer the scrambled method as well. I was wondering how easy it would be to code in a database of words say for Dwarven to Common or something like this:

Hammer > Methrellor
Strength > Halaa
Strength and Honor > Halaa va Shalaa

Or something like that. Where when the player says a certain phrase even it gets translated. Especially if it's something they would say a lot. Like in the movie Gladiator they always said 'Strength and Honor' to one another during the movie as a sort of motto. I guess with this method the possibilities to translate and create your own compilation of words from one language to another and have it work correctly, (albeit limited to certain words) would be only limited to your imagination.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Author Message
KGZotU



Joined: 08 Nov 2006
Posts: 7

PostPosted: Mon Aug 03, 2009 11:12 pm    Post subject: Reply with quote

One solution would be to map native language character combinations into "syllables" of an artificial language. This way you could have output that is pronounceable. You could even have a separate mapping for each racial language, giving each a unique feel. You might achieve this feel by looking at an IPA chart and relying heavily on or excluding certain families of sounds.

You wouldn't want to manually specify the mapping for each combination. I'm thinking 100 (or maybe more) syllables should do the trick. Let's say you have N. So you could iterate through each word, taking three letters at a time, consider them a base 26 number equal to n, and then pull the (n mod N)th syllable.

Such a system would also eliminate a reverse mapping because it would have so much overlap. But it would be deterministic, so "strength and honor" would always be whatever it was, aside from any misspellings by your players.
Back to top
View user's profile Send private message
Author Message
Mabus



Joined: 17 Mar 2009
Posts: 8

PostPosted: Tue Aug 04, 2009 11:17 pm    Post subject: Reply with quote

Delerak wrote:
I was wondering how easy it would be to code in a database of words say for Dwarven to Common or something like this:

Hammer > Methrellor
Strength > Halaa
Strength and Honor > Halaa va Shalaa

Bo Zimmerman's CoffeeMud already does this using Hashtable, if you are looking for a working example.
Back to top
View user's profile Send private message
Author Message
shasarak



Joined: 29 Jun 2005
Posts: 134
Location: Emily's Shop

PostPosted: Fri Aug 14, 2009 8:26 am    Post subject: Reply with quote

KaVir wrote:
Another issue is that I can speak German. My written German isn't very good, but if other players were talking German around me, I could certainly understand what they said, even if my character didn't speak German. I would have to pretend I didn't know what people were saying, even if two people standing right beside me were discussing how best to murder me.

This, it seems to me, is the key point. Linguistic authenticity is NOT the goal, here - the goal is to ensure that the player's understanding of what is said around him is restricted by his character's proficiency in the language. If you produce anything other than randomised gibberish, this immediately means that an experienced player can understand more than he is supposed to be able to understand because of his OOC familiarity with the translation mechanism. It doesn't matter whether you're translating into German or Dwarvish - if the player can understand it even when his character can't, then the mechanism is flawed.

(edited for typos)


Last edited by shasarak on Tue Sep 08, 2009 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Author Message
robbert



Joined: 07 Sep 2009
Posts: 1
Location: United States

PostPosted: Mon Sep 07, 2009 3:38 pm    Post subject: Reply with quote

The other point brought up by the OP is valid, however - one should have a chance of learning a language through immersion. The more a language is heard around the character, the more familiar with it they become.

And Shasharak, your point is right on the money - the user behind the keyboard eventually learns a bulk of common phrases in all languages simply through repetition. While this is defeatable (use a different hash value for each character creation to mix the words), it then precludes the character from using the word in the reverse sense. (Ie, "Robbert asks Mabus, 'What does Methrellor mean?'").

Also agree with KaVir's point - you cannot have literal translations into other languages because the mechanics will differ from each, and will render the result unusable in the long term. A better method, if one wanted to link languages, would be to use a single grammatical engine with literal word replacement. This would fix the translation problem, but not correct the realism desired by the OP.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Author Message
MECHFrost



Joined: 12 Dec 2009
Posts: 27

PostPosted: Sat Dec 12, 2009 11:05 am    Post subject: Reply with quote

robbert wrote:
While this is defeatable (use a different hash value for each character creation to mix the words), it then precludes the character from using the word in the reverse sense. (Ie, "Robbert asks Mabus, 'What does Methrellor mean?'").


You can allow users to use a language even if they don't speak it, with a special command e.g. if the player types 'What does $dwarven(Methrellor) mean?' it converts Methrellor from the dwarven language to English (if the mapping from English to Dwarvish is injective) allowing Dwarvish-speakers to understand what he said. The translated words have to be clearly identified so that the dwarven player knows that the English-speaking player made an effort to speak his language. They could see something like:

Player1 says 'What does $wine$ mean?' with a strong accent.
Players1 says 'What does wine mean?', using the Dwarvish word for wine.
Back to top
View user's profile Send private message
Author Message
Viriato



Joined: 02 Feb 2010
Posts: 2

PostPosted: Tue Feb 02, 2010 11:56 am    Post subject: Reply with quote

Good evening. My first post here in foruns Smile
Just an opinion: if trying to use dictionary or grammar, then there are lots of "human" ways to work around when someone does not know the language.
Kavir knows German. Playing an english MUD, if 2 guys speak in german, even if Kavir does not have German language skill points in game, he will understand. That is why I also support the not-understandable input.

The way to code it is also a very interesting things.

Another opinion about multiple languages (I don't know if was spoken here or not), and eventually this dictionary/grammar thing could be usefull, is to have a MUD option so I can read descriptions and use commands in my language rather than creator's own.
I guess it already exist this, but the working way is to have multiple descriptions in multiple languages for the same room, and not a translation.

Thanks
Back to top
View user's profile Send private message
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Tue Feb 02, 2010 3:30 pm    Post subject: Reply with quote

Welcome, Viriato.

Viriato wrote:
I guess it already exist this, but the working way is to have multiple descriptions in multiple languages for the same room, and not a translation.

That's a really nice idea conceptually, but I fear the effort involved would be huge - writing decent room descriptions requires a lot of work, and a simple word-by-word translation definitely wouldn't be enough, so you'd need people to manually translate each room description.

I suspect doing this would also be far less interesting than writing your own descriptions, as there's much less room for creativity, and I imagine most mud owners would rather spend that time and effort expanding their world with new rooms instead.

It might be a viable option for muds that exclusively use dynamically generated descriptions, though. But even that would require a lot of effort.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Viriato



Joined: 02 Feb 2010
Posts: 2

PostPosted: Wed Feb 03, 2010 11:25 am    Post subject: Reply with quote

I tried to say exactly that: to make it work, the best way would be having 2 or more describes for each room, each in a different language, rather than one describe and one "translateToXXX" function.

Your tip about amount of work it takes from a builder is usefull, as you have huge experience and is something I cannot imagine.
Back to top
View user's profile Send private message
Author Message
MECHFrost



Joined: 12 Dec 2009
Posts: 27

PostPosted: Thu Feb 04, 2010 3:19 pm    Post subject: Reply with quote

It could be worth the effort translating though. For example, my mother language is French and I know that there are only two French MUDs out there, and they are basically stock Diku (supposedly original code) with a very small world. With such poor competition, it sounds easy to attract French-speaking players to my MUD. A downside is that many English-speaking players could be turned off by other players who don't speak their language perfectly. My experience with international RPGs is that those who only have a very limited vocabulary are considered barbarous and high annoying. I think in particular role-players, who tend to be eloquent and stuck-up (I don't want to start an argument by saying that but it's my view), will hate a bilingual MUD, but it can work if the % of non-English speakers is smaller.
Back to top
View user's profile Send private message
Author Message
chaos



Joined: 24 Aug 2007
Posts: 35
Location: New Jersey

PostPosted: Thu Mar 11, 2010 6:03 pm    Post subject: Reply with quote

We use a hybrid approach. The main language obfuscation mechanism replaces uncomprehended words with nonsense words generated according to rules for the language. For example, a language might be configured like this:

Code:
    set_consonant_initiator_chance(60);
    set_consonant_terminator_chance(25);
    set_language_categories(([
        "flowing"           : 20,
        "rapid"             : 6,
        "murmuring"         : 5,
        "fricative"         : 3,
        "hollow"            : 1,
    ]));
    set_syllable_number("many");


This helps give the nonsense text more of the intended flavor of the language. Languages can also have an optional translation table, which isn't trying to do any sort of true translation, but just overrides the nonsense-word replacement for particular words. For example, if someone says "light" in Elvish, and you don't understand it, it would be replaced with "galad". This allows a little bit of user-level bypassing of the language obfuscation, but IMO that's fine, and the flavor benefit is worth it.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Zephen_Descartes



Joined: 21 Sep 2007
Posts: 20

PostPosted: Sun Jun 13, 2010 9:23 pm    Post subject: Reply with quote

Why not look at it from another angle? Make the problem of player's learning the language tricks a feature. Let players list a language they want to learn in their account.

When someone says something the word is looked up in a database of languages and translated via a language dictionary into their desired language.

Context isn't there, sure. Neither is grammar, but it's a vocabulary builder. For words not in the dictionary, just let them through. Consider them like loan words.


Some people will probably abuse the system and list a language they already know. Is that that horrible? There's always some way to abuse a system, and honestly this should be an immersion feature more than an information control feature.

If I cheat the system, I fail to learn some french words that can help me in learning to actually read french. My loss.


Just a thought.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign