TLDR: Polish uses imperative. The rest of this post is me going down a rabbit hole.
Iâll be honest, I donât think Iâve ever seen a parser game in Polish (which is my native language) and so, this post made me think about what parser commands would be like in Polish. I assumed that theyâd be in imperative as infinitive wouldnât make sense, but itâd also probably require the parser to be able to recognize Polish declension. But if weâre taking declension into account, it also means you have to do a lot of coding around itâŠ
Letâs take for example, a classic: GET LAMP. âTo getâ is âwziÄ
Äâ, âlampâ is âlampaâ, but âwziÄ
Ä lampaâ is very clunky and makes no sense. We need the imperative of âwziÄ
Äâ (âweĆșâ) and accusative of âlampaâ (âlampÄâ). âWeĆș lampÄâ is natural and therefore probably most likely to be used. But what about EXAMINE LAMP? Thatâs a whole different case for âlampaâ!
Again, I donât know Polish parsers or parsers translated to Polish, so I decided to try and find something. This is how I found Polish library for Inform 6. There are a couple of test adventures included so I decided to check how things are being solved, even though I know even less I6 than I7. This, naturally, leads to me not being able to parse (heh) the code properly and I might be wrong, but I think I might have a gist of what happens here.
There are some encoded grammar rules (please donât ask me how it works, I have no idea) and every object gets a full declension. Letâs take a look at the Colossal Cave Adventureâs random object â brass lamp.
Long excerpt of the code
Object -> brass_lantern "mosiÄĆŒna lampa"
with name 'lampa' 'latarnia' 'ĆwiatĆo' 'mosiÄĆŒna' 'bĆyszczÄ
ca',
name_dop 'lampy' 'latarni' 'ĆwiatĆa' 'mosiÄĆŒnej' 'bĆyszczÄ
cej',
name_cel 'lampie' 'latarni' 'ĆwiatĆu' 'mosiÄĆŒnej' 'bĆyszczÄ
cej',
name_bie 'lampÄ' 'latarniÄ' 'ĆwiatĆo' 'mosiÄĆŒnÄ
' 'bĆyszczÄ
cÄ
',
name_nar 'lampÄ
' 'latarniÄ
' 'ĆwiatĆem' 'mosiÄĆŒnÄ
' 'bĆyszczÄ
cÄ
',
name_mie 'lampie' 'latarni' 'Ćwietle' 'mosiÄĆŒnym' 'bĆyszczÄ
cym',
desc_dop "mosiÄĆŒnej lampy",
desc_cel "mosiÄĆŒnej lampie",
desc_bie "mosiÄĆŒnÄ
lampÄ",
desc_nar "mosiÄĆŒnÄ
lampÄ
",
desc_mie "mosiÄĆŒnej lampie"
Uhm, wow, okay, letâs unpack this! See, Polish has seven cases (nominative, genitive, dative, accusative, instrumental, locative, and vocative). What this bit of code above seems to be doing is establishing six variants (as vocative would be useless for a parser game) for âlampâ, âlanternâ, âlightâ (in terms of illumination, not weight), âbrassâ, and âshinyâ. The three letter abbreviations like âdopâ and âbieâ are short forms of the case names in Polish. This seems to be used later on in commands. Thereâs also a long list of commands which can be used⊠though it seems like âtakeâ was bringing some trouble.
Verb 'weĆș' 'zabierz' 'podnieĆ' ! TU ZMIANA
* biernikmulti -> Take
* multiinside 'from' noun -> Remove; ! <- tu jest problem, ktĂłry wymaga poprawek w parserze... :(
The comments say â! CHANGE HEREâ (as in, indication that something has changed) and a note âhereâs a problem which requires fixing the parser :(â. I have no idea what âmultiâ means in this place but I presented this bit anyway because it shows that âbiernikâ is used. What is âbiernikâ? Polish word for accusative. Letâs take a different bit of code⊠letâs EXAMINE the lamp.
Verb 'przyjrzyj'
* 'siÄ' celowniknoun -> Examine;
See, in Polish, examining is used with a reflexive pronoun, so itâs âprzyjrzeÄ siÄâ, and itâs paired with dative (âcelownikâ). âPrzyjrzyjâ alone would be extremely unnatural.
So, what I assume happens? You establish every grammatical possibility (outside of vocative) so you can both TAKE LAMP (weĆș lampÄ) and EXAMINE LAMP (przyjrzyj siÄ lampie), and also TAKE BRASS LAMP (weĆș mosiÄĆŒnÄ
lampÄ) and EXAMINE BRASS LAMP (przyjrzyj siÄ mosiÄĆŒnej lampie), and- you get me.
Iâm so sorry for an entire massive post but if I went down this rabbit hole and learned, I think I have a full right to share this knowledge.
Sidenote, the name_mie segment for the lamp seems to be incorrect. Itâs responsible for miejscownik, or locative. You can think of it as of answering the question: âabout who? about what?â, and it should go 'lampie' 'latarni' 'Ćwietle' 'mosiÄĆŒnej' 'bĆyszczÄ
cej'. The way it currently goes, it seems like someone made a mistake and started declension for âlightâ instead of âlampâ, as the declension here follows a pattern thatâd fit the gender-neutral light instead of a feminine lamp. This doesnât happen anywhere else so I assume itâs a mistake.