JMTrans icon indicating copy to clipboard operation
JMTrans copied to clipboard

English translation text overlaps sometimes

Open a-lgil opened this issue 4 years ago • 1 comments

When translating from Japanese to English, on some occasions the translated text overlaps.

Here's an example where the translation has overlaping text on the left and correctly formated text on the right:

ex1 ex2

I think that the problem may occur whenever the original text is written vertically (in languages such as with Chinese, Japanese or Korean) and the destination language only supports horizontal writing (such as English, Spanish or French).

Checking the size of the new text boxes, testing if they will overlap and displacing the text downwards could be a solution, since I think it's preferable having the text protrude from the bottom of the speech bubble than having it overlap.

a-lgil avatar Dec 28 '20 03:12 a-lgil

The problem is opencv contour method detect the text as two boxes. Its box detection gives too low near item grouping power to grouping together

I am still not sure about best optimization on its strength parameter that control size of grouping box. For now, i uses image input width(height) size * 2.5% as parameter

In next version, I will increase default opencv contour strength parameter and i will give you manual setting box to control its parameter

Currently, I am looking for any other box clipping method and automatic parameter optimization

ttop32 avatar Dec 29 '20 12:12 ttop32