Textractor icon indicating copy to clipboard operation
Textractor copied to clipboard

Add space at the end of a sentence before it is translated

Open Dzack33 opened this issue 3 years ago • 6 comments

Hi ! ^_^ I would like to know if it is possible to add a little space at the end of a sentence before it is translated because when they are translated it can give you quite bad results obviously ^^'

Capture d’écran (717)

Dzack33 avatar Jan 02 '22 22:01 Dzack33

This is the problem I pointed out in this thread by asking if anyone would be able to create an extension that allows you to edit the text so that you can separate the joined words

https://github.com/Artikash/Textractor/discussions/567#discussioncomment-1627250

An alternative method is to create a spelling extension of the English text that automatically corrects misspelled words. Unfortunately my knowledge of the CPP is limited and I am not able to do.

As a workaround I tried to use a python spelling library (symspell) to create a server and create an extension that passes the text to the python server, but the best solution would be to use the spelling library directly in the extension.

Blu3train avatar Jan 03 '22 14:01 Blu3train

It looks to me that there were never any spaces in original text to begin with. Instead each line in game text window is separated by some special character in game scripts and then game engin knows that if that special chracter is found in text then just move to next line.

You would have to use some external api or some code where if you input i'mneeded then that code/api can return correct results. Like in google translate here You can see that google is suggesting you that 'Did you mean I'm needed'

shoaibshakeel381 avatar Jan 13 '22 18:01 shoaibshakeel381

Use this Lua script: Spellcheck.zip

Artikash avatar Feb 02 '22 02:02 Artikash

Thank you very much

Blu3train avatar Feb 02 '22 07:02 Blu3train

Используйте этот сценарий Lua: Spellcheck.zip https://github.com/Artikash/Textractor/issues/812#issuecomment-1126629232

RoyalKir avatar May 14 '22 03:05 RoyalKir

Используйте этот сценарий Lua: Spellcheck.zip

I don't know which of these helped me, but I solved the problem this way, when I did everything exactly as in the screenshots, I lost \n and managed to get the correct spaces between words )

2022-05-14_09-30-21

RoyalKir avatar May 14 '22 06:05 RoyalKir