Korean postposition problem

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
lellel
Newbie
Posts: 1
Joined: Tue Mar 14, 2023 6:24 am
Contact:

Korean postposition problem

#1 Post by lellel »

Korean postposition problem

Korean has a postposition.

If it's a fixed sentence, it doesn't matter, but
If a variable like [xxx.name] is included, there is a problem setting the postposition.

Since We don't know the preceding word, We can only process the postposition as '(은)는', which is not very readable.

ex)[xxx.name](은)는

There should be a function to handle this separately, so I've created the JOSA function and it's working fine. But I'm not sure I've done it right.
I need some technical advice on this.

Renpy 7.4.11

\renpy\text\text.py

Code: Select all

    def tokenize(self, text):
        """
        Convert the text into a list of tokens.
        """

        tokens = [ ]

        for i in text:

            if isinstance(i, str):
                tokens.extend(textsupport.tokenize(pyjosa.replace_josa(i))) ##### ADDED - KOREAN JOSA

            elif isinstance(i, basestring):
                tokens.extend(textsupport.tokenize(pyjosa.replace_josa(str(i)))) ##### ADDED - KOREAN JOSA

            elif isinstance(i, renpy.display.core.Displayable):
                tokens.append((DISPLAYABLE, i))

            else:
                raise Exception("Can't display {0!r} as Text.".format(i))

        return tokens

Attachments
JOSA.zip
(17.9 KiB) Downloaded 22 times

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Korean postposition problem

#2 Post by PyTom »

Can you explain what the problem here is?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

nsa901
Newbie
Posts: 6
Joined: Wed Aug 09, 2023 9:33 am
Github: Seo-A-Nam
itch: seo-a-nam
Discord: SAN#0799
Contact:

Re: Korean postposition problem

#3 Post by nsa901 »

Hello, is the issue you mentioned earlier still unresolved?

Post Reply

Who is online

Users browsing this forum: No registered users