Contextual NPC Translation System
Posted: 23 Jan 2018, 15:56
Hello, Dear Community!
Due to some recent encounters, I decided to present the system I've been working on last year that's purpose is to make translator's life easier and the translations itself more clear and consistent. The idea was to consider the whole NPC dialogue at once, to show relations between phrases (player's phrases as well as NPC's). I've called it 'contrast', an abbreviation for 'Contextual NPC Translation System', also it should make contrast in the translation process
If you don't want to read such a long post, you can start exploring the results here: http://makarov.droppages.com/index.html
There was a discussion how that could be done, and there was many ideas. We've came up with thought that the solution could be a tree representation of the dialogue, where nodes represent separate phrases and links between them says that one phrase follow the another. In theory, construction of such a tree may be quite a hard task: one can come up with a script that barely will be understood by a parser in terms of phrase sequence. But, as it turns out (and as it should be, I think), most scripts have understandable structure and such a tree can be constructed without big problems.
Enough speaking. Let me show you the results I have. I attach here an image of a tree constructed by parsing Silvio dialogue. If you click on the node, a corresponding dialogue phrase shows up in a bubble (I'm sorry if it doesn't work in some browsers), also it appears on the translation panel to the right. Yellow nodes correspond to player's phrases, green to NPC's ones, blue for all other. Big black START node is an entry point for the dialogue, it starts from this node (there are some cases when it does not, but that's not very important). Multiple links going out the same node may correspond to menus, gender-related phrases or simply conditional phrases. By following the links from the START node, one should understand what's the dialogue all about.
There are function-style dialogues. One of the best examples is Julia's one. Note that the CALL nodes stand for function calls. If you hold your mouse clicked on them, corresponding function entry nodes are highlighted. If you right-click on a call node, you will be centered on the entry point of the function the call is made to. RET nodes stands for leaving the function, in most cases returning to the place where the call was made.
The panel to the right is made specially for translators. Translator gets her Transifex API key here https://www.transifex.com/user/settings/api/ and puts it in the corresponding field on the panel, same for the language slug (it is 'ru' for me) she translates into. Then she loads all strings by pressing 'Get strings' button and waits for a message about successful loading. Translated phrases' nodes will be bounded green, untranslated remain red. Translation itself is done by entering translation string into the second big field on the panel and pressing 'Update' button.
All parsed scripts are shown on the page mentioned at the start and at the end of this post. Corresponding trees are accessible through hyperlinks. Links to the original scripts on the github are near. Please note that the project is in its very alpha stage, and now some scripts are not parsed, for example, because multiple NPC dialogues in one script file are not handled properly. Please note that the trees might not correctly show some dialogue cases. The trees are like an approximate image of what's happening inside the dialogue, not precise. Please be careful.
The whole project is stored inhere: https://gitlab.com/vasily_makarov/contrast. The web pages I provided the links to are generated by special environment, it is inside the repo too. HTML pages themselves are stored in my Dropbox Pages App, as you may find out from the link. Please note that if some scripts are updated, I need to update these pages too, the process is not automatical. At the moment they're all actual.
I think I've told you all I want about the contrast. I wanted to share this to hear your opinion about it and, perhaps, gain some motivation: when someone's interested, I gain a lot of motivation. I would appreciate any thoughts about it, both negative and positive. I would love to hear new ideas about it as well.
I remind you that you can explore the parsing results here:http://makarov.droppages.com/index.html. By the way, some trees are just single big START node. That mostly means they're not NPC dialogues or just does not use translation functions
Yours,
Vasily
Due to some recent encounters, I decided to present the system I've been working on last year that's purpose is to make translator's life easier and the translations itself more clear and consistent. The idea was to consider the whole NPC dialogue at once, to show relations between phrases (player's phrases as well as NPC's). I've called it 'contrast', an abbreviation for 'Contextual NPC Translation System', also it should make contrast in the translation process
If you don't want to read such a long post, you can start exploring the results here: http://makarov.droppages.com/index.html
There was a discussion how that could be done, and there was many ideas. We've came up with thought that the solution could be a tree representation of the dialogue, where nodes represent separate phrases and links between them says that one phrase follow the another. In theory, construction of such a tree may be quite a hard task: one can come up with a script that barely will be understood by a parser in terms of phrase sequence. But, as it turns out (and as it should be, I think), most scripts have understandable structure and such a tree can be constructed without big problems.
Enough speaking. Let me show you the results I have. I attach here an image of a tree constructed by parsing Silvio dialogue. If you click on the node, a corresponding dialogue phrase shows up in a bubble (I'm sorry if it doesn't work in some browsers), also it appears on the translation panel to the right. Yellow nodes correspond to player's phrases, green to NPC's ones, blue for all other. Big black START node is an entry point for the dialogue, it starts from this node (there are some cases when it does not, but that's not very important). Multiple links going out the same node may correspond to menus, gender-related phrases or simply conditional phrases. By following the links from the START node, one should understand what's the dialogue all about.
There are function-style dialogues. One of the best examples is Julia's one. Note that the CALL nodes stand for function calls. If you hold your mouse clicked on them, corresponding function entry nodes are highlighted. If you right-click on a call node, you will be centered on the entry point of the function the call is made to. RET nodes stands for leaving the function, in most cases returning to the place where the call was made.
The panel to the right is made specially for translators. Translator gets her Transifex API key here https://www.transifex.com/user/settings/api/ and puts it in the corresponding field on the panel, same for the language slug (it is 'ru' for me) she translates into. Then she loads all strings by pressing 'Get strings' button and waits for a message about successful loading. Translated phrases' nodes will be bounded green, untranslated remain red. Translation itself is done by entering translation string into the second big field on the panel and pressing 'Update' button.
All parsed scripts are shown on the page mentioned at the start and at the end of this post. Corresponding trees are accessible through hyperlinks. Links to the original scripts on the github are near. Please note that the project is in its very alpha stage, and now some scripts are not parsed, for example, because multiple NPC dialogues in one script file are not handled properly. Please note that the trees might not correctly show some dialogue cases. The trees are like an approximate image of what's happening inside the dialogue, not precise. Please be careful.
The whole project is stored inhere: https://gitlab.com/vasily_makarov/contrast. The web pages I provided the links to are generated by special environment, it is inside the repo too. HTML pages themselves are stored in my Dropbox Pages App, as you may find out from the link. Please note that if some scripts are updated, I need to update these pages too, the process is not automatical. At the moment they're all actual.
I think I've told you all I want about the contrast. I wanted to share this to hear your opinion about it and, perhaps, gain some motivation: when someone's interested, I gain a lot of motivation. I would appreciate any thoughts about it, both negative and positive. I would love to hear new ideas about it as well.
I remind you that you can explore the parsing results here:http://makarov.droppages.com/index.html. By the way, some trees are just single big START node. That mostly means they're not NPC dialogues or just does not use translation functions
Yours,
Vasily