Rpapo's Translation Assistant.

This forum is for Games & Computing related discussion

Moderators: Fringe Security Bureau, Senior Editors, Senior Translators, Alt. Language Translator/Editor, Executive Council, Project Translators, Project Editors

Locked
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:Say, is it normal for the Window not to be resizable ???
The window is resizable, but only to make it wider or taller than the basic size. Once you enlarged it, you are permitted to shrink it back to that basic size, but no further. That's the way I coded it.
Lery wrote:Did you do some update in-between ?? Should I download again and "reinstall" it ?
Re-downloading now and then is a good idea, as you will get my latest changes. But when you do that, you really ought to regenerate the dictionary, thus taking advantage of any update to EDICT or any change I make to the dictionary generation algorithm (see next).
Lery wrote:I've just rebuilt the dictionary and got 100'000 more entries, fyi ^^ Thanks again, I like it.
I changed the dictionary building algorithm slightly for adjectives, mainly so that na-adjectives, followed by the 'na' suffix, are grouped together. That, and I downloaded a fresh copy of EDICT from WWWJDICT.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Nice !
Well, the problem I have is that the "basic" size is fine on my primary display (2560*1440) but it's just waaaay too big for my second screen (which is *only* full HD, 1920*1080... :mrgreen: )

Do you hardcode the basic size given the screen resolution ??? :)
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:Nice !
Well, the problem I have is that the "basic" size is fine on my primary display (2560*1440) but it's just waaaay too big for my second screen (which is *only* full HD, 1920*1080... :mrgreen: )

Do you hardcode the basic size given the screen resolution ??? :)
I use a smaller display (1600 x 900) and it works just fine. But that is because the window's minimum size is defined in "dialog units", which is something Windows defines in terms of the configured display font. The critical line of code is in the dialog resource script (Honyaku_no_Hojo.rc), line 90:

Code: Select all

IDD_HONYAKU_NO_HOJO_DIALOG DIALOGEX 0, 0, 520, 300
STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "翻訳者の補助 (Translator's Helper)"
FONT 10, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT           "こちらにテクストをお入り下さい (Please enter text here):",IDC_PROMPT,10,10,500,10
    EDITTEXT        IDC_INPUT_TEXT,10,20,500,40,ES_MULTILINE | ES_AUTOHSCROLL
    DEFPUSHBUTTON   "翻訳をして (Translate)",IDC_TRANSLATE,10,62,500,12
    EDITTEXT        IDC_RESULTS,10,76,500,214,ES_MULTILINE | ES_READONLY | WS_VSCROLL
END
So the system takes that 520 x 300 size in "dialog units" and converts that according to your system font settings.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Holy cow ! ^^''
Since I'm really short-sighted, I may have an huge display, but I'm also using a bigger DPI setting than usual. ^^''
So since I've set the font to use a 125% scaling, it explains why the windows is so big.

Well, I guess I'd have to install some compiler to compile it, so I won't modify that now, but I'll definitively do it once I have time. :o
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:Holy cow ! ^^''
Since I'm really short-sighted, I may have an huge display, but I'm also using a bigger DPI setting than usual. ^^''
So since I've set the font to use a 125% scaling, it explains why the windows is so big.

Well, I guess I'd have to install some compiler to compile it, so I won't modify that now, but I'll definitively do it once I have time. :o
It was built with Microsoft Visual Studio 2008. But you needn't try and find a bootleg copy of that (or a legal through MSDN). I've just shaved 200 units off from each dimension. It just doesn't look as good when it's stretched to the size I normally use...

Please download and try again. There's a newer copy of EDICT in there too, so you should probably rebuild the dictionary.

Good luck. I am turning in for the night...
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Ah okay, thanks you. I was already in my Bed ^^''

I've just downloaded it, I'll try it this evening, when I have a little time. :)
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Alright, I've just re-installed it and so far so good.
FYI.

Code: Select all

C:\nihongo>x64\release\Nihongo.exe test.txt output.txt 0 9999
Loading dictionary.
ERROR: Unable to open dictionary file 'Dictionary.dat' for reading.
Building dictionary file from EDICT.
  169852 dictionary entries.
Loading additional words.
Dumping dictionary to text file.
Building word/phrase index.
  7063751 index entries.
Saving dictionary.
  Dictionary save complete.
Processing document.
ERROR: Invalid source file 'test.txt'.
I had another 100'000 new entries. :mrgreen:

But the size problem is still there, here is a screenshot :
http://img163.imageshack.us/img163/622/ocpg.png
It's even going to far at the bottom, I don't know how high it is, but it's higher than my main screen. :o
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:But the size problem is still there, here is a screenshot :
http://img163.imageshack.us/img163/622/ocpg.png
It's even going to far at the bottom, I don't know how high it is, but it's higher than my main screen. :o
Run REGEDIT with Administrator privileges, and remove the following key from the registry:

HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\Honyaku_No_Hojo\Position

Then restart the application. This should obliterate any saved position and size, and allow it to default the size anew.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Done, but I'm still getting the exact same size. Strange. :shock:
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Hello, I think I found a bug :

せいで is coming from 所為 = cause/ reason/ fault ... I think... no ???

It get recognize as
" せいで = [Plain Conjunctive] (n,n-pref) (1) Saint/St./S./(n,adj-na) (2) sacred/holy/pure/"
which makes no sense where "cause / reason" makes sense in my context ;)
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:Hello, I think I found a bug :

せいで is coming from 所為 = cause/ reason/ fault ... I think... no ???

It get recognize as
" せいで = [Plain Conjunctive] (n,n-pref) (1) Saint/St./S./(n,adj-na) (2) sacred/holy/pure/"
which makes no sense where "cause / reason" makes sense in my context ;)
I get the same thing from "せいで", but when I enter "所為" I get this:
Original: 所為
Kana: せい
Romaji: sei
Definitions:
所為 (せい) = (n) (uk) consequence/outcome/result/blame/(P)/
所為 (せえ) = (ik) (n) (uk) consequence/outcome/result/blame/
所為 (しょい) = (n) (obsc) act/deed/one's doing/
Looking directly into DICTIONARY.TXT, I find this:
(n,n-pref) (1) Saint/St./S./(n,adj-na) (2) sacred/holy/pure/
聖 (せい)
聖 (せい) [Stem]
聖じゃない (せいじゃない) [Plain Negative (2)]
聖だった (せいだった) [Plain Positive Past]
聖だったら (せいだったら) [Plain Positive Conditional]
聖だったり (せいだったり) [Plain Positive Alternative]
聖だろう (せいだろう) [Plain Presumptive (1)]
聖で (せいで) [Plain Conjunctive]
聖でいた (せいでいた) [Plain Progressive Past (1)]
聖でいて (せいでいて) [Plain Progressive Conjunctive (1)]
聖でいました (せいでいました) [Polite Progressive Past]
聖でいます (せいでいます) [Polite Progressive]
聖でいる (せいでいる) [Plain Progressive]
聖でた (せいでた) [Plain Progressive Past (2)]
聖でて (せいでて) [Plain Progressive Conjunctive (2)]
聖でる (せいでる) [Plain Progressive Casual]
聖でわな (せいでわな) [Plain Negative (1), Stem]
聖でわない (せいでわない) [Plain Negative (1)]
聖でわなかった (せいでわなかった) [Plain Negative Past]
聖でわなかったら (せいでわなかったら) [Plain Negative Conditional]
聖でわなかったり (せいでわなかったり) [Plain Negative (1), Plain Positive Alternative]
聖でわなかろう (せいでわなかろう) [Plain Negative (1), Plain Presumptive (1)]
聖でわなく (せいでわなく) [Plain Negative (1), Adverb]
聖でわなくさせる (せいでわなくさせる) [Plain Negative (1), Causative]
聖でわなくて (せいでわなくて) [Plain Negative (1), Plain Conjunctive]
聖でわなくていた (せいでわなくていた) [Plain Negative (1), Plain Progressive Past (1)]
聖でわなくていて (せいでわなくていて) [Plain Negative (1), Plain Progressive Conjunctive (1)]
聖でわなくていました (せいでわなくていました) [Plain Negative (1), Polite Progressive Past]
聖でわなくています (せいでわなくています) [Plain Negative (1), Polite Progressive]
聖でわなくている (せいでわなくている) [Plain Negative (1), Plain Progressive]
聖でわなくてた (せいでわなくてた) [Plain Negative (1), Plain Progressive Past (2)]
聖でわなくてて (せいでわなくてて) [Plain Negative (1), Plain Progressive Conjunctive (2)]
聖でわなくてる (せいでわなくてる) [Plain Negative (1), Plain Progressive Casual]
聖でわなさ (せいでわなさ) [Plain Negative (1), Noun (from adjective)]
聖でわなそう (せいでわなそう) [Plain Negative (1), Seems (from adjective)]
聖でわなまして (せいでわなまして) [Plain Negative (1), Polite Positive Conjunctive]
聖でわなませんで (せいでわなませんで) [Plain Negative (1), Polite Negative Conjunctive]
聖な (せいな) [Plain Positive]
聖に (せいに) [Adverb]
聖にさせる (せいにさせる) [Causative]
聖まして (せいまして) [Polite Positive Conjunctive]
聖ませんで (せいませんで) [Polite Negative Conjunctive]
Because the program does searches by longest match, and it has a match against せいで, it doesn't try to break it up and consider the で as an independent particle.

In short, the parser needs to be smarter . . . something I've known for a long time.

You can cheat, though, and force the parser to consider the parts separately by inserting a space between the せい and the で, which case you get this wall of text:
Original: せい で
Kana: せい で
Romaji: sei de
Definitions:
せい = (n) (1) nature (of a person)/(2) sex/(3) gender/(suf) (4) -ty/-ity/-ness/-cy/(P)/
せい = (n) (1) spirit/sprite/nymph/(2) energy/vigor (vigour)/strength/(3) fine details/(4) semen/(P)/
せい = (n) (1) surname/family name/(2) hereditary title (used in ancient Japan to denote rank and political standing)/(P)/
せい = (n) (uk) consequence/outcome/result/blame/(P)/
せい = (n) height/stature/(P)/
せい = (n,adj-no) (1) (logical) true/regular/(num) (2) 10^40/ten thousand undecillion (short scale)/ten thousand sextillion (long scale)/(n,adj-no) (3) (abbr) original/(4) (math) positive/greater than zero/(P)/
せい = (n,n-suf) -made/make/(P)/
せい = (n,n-suf) system/organization/organisation/imperial command/laws/regulation/control/government/suppression/restraint/holding back/establishment/(P)/
せい = (ctr) (1) counter for generations/(n-suf) (2) (geol) epoch/
せい = (n) (1) (astron) Chinese "star" constellation (one of the 28 mansions)/(n,n-suf,n-pref) (2) Singapore/
せい = (n) (1) (obsc) well curb/(2) (astron) Chinese "Well" constellation (one of the 28 mansions)/
せい = (n) (1) life/living/(n,n-suf) (2) (male) (hum) I/me/myself/
せい = (n) (1) stillness/(2) quiet/peacefulness/
せい = (n) (abbr) Spain/
せい = (n) Qi (kingdom in China during the Spring and Autumn Period and the Period of the Warring States)/Ch'i/
せい = (n) flag (esp. originally a flagpole-topping streamer made of feathers)/
せい = (n) height/stature/
せい = (n) rule/government/
せい = (n,n-pref) (1) Saint/St./S./(n,adj-na) (2) sacred/holy/pure/
せい = (n,n-suf) (1) energy/(n) (2) military strength/
で = (n,n-suf) (1) coming out/going out/outflow/efflux/rising (of the sun or moon)/(2) attending (work)/appearing (on stage)/one's turn to go on/(3) start/beginning/(4) origins/background/person (or item) originating from .../graduate of .../native of .../member of ... (lineage)/(5) architectural member that projects outward/(6) highest point of the stern of a ship/(7) (uk) amount (comprising something)/amount of time or effort required to do something/(P)/
で = (prt) (1) indicates location of action/at/in/(2) indicates time of action/(3) indicates means of action/cause of effect/by/(conj) (4) and then/so/(aux) (5) indicates continuing action/(prt) (6) (ksb:) indicates certainty, emphasis, etc./(P)/
で = [Stem] (v1,vi) (1) to leave/to exit/to go out/to come out/to get out/(2) to leave (on a journey)/to depart/to start out/to set out/(3) to move forward/(4) to come to/to get to/to lead to/to reach/(5) to appear/to come out/to emerge/to surface/to come forth/to turn up/to be found/to be detected/to be discovered/to be exposed/to show/to be exhibited/to be on display/(6) to appear (in print)/to be published/to be announced/to be issued/to be listed/to come out/(7) to attend/to participate/to take part/to enter (an event)/to play in/to perform/(8) to be stated/to be expressed/to come up/to be brought up/to be raised/(9) to sell/(10) to exceed/to go over/(11) to stick out/to protrude/(12) to break out/to occur/to start/to originate/(13) to be produced/(14) to come from/to be derived from/(15) to be given/to get/to receive/to be offered/to be provided/to be presented/to be submitted/to be handed in/to be turned in/to be paid/(16) to answer (phone, door, etc.)/to get/(17) to assume (an attitude)/to act/to behave/(18) to pick up (speed, etc.)/to gain/(19) to flow (e.g. tears)/to run/to bleed/(20) to graduate/(P)/
Unfortunately, I don't have a way to force the parser to join stuff. Not yet.
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Alright, I just wanted to report in case it was a easy fix ;)

So it's not a bug ^^

By the way, do you often see the つた = "Ivy" entry ??? I get it so often after adverbs or adjectives that I'm wondering if it may be a grammatical form that I don't know... :|
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:By the way, do you often see the つた = "Ivy" entry ??? I get it so often after adverbs or adjectives that I'm wondering if it may be a grammatical form that I don't know... :|
Are you sure it isn't った rather than つた? The little tsu makes a huge difference in how you read things...
User avatar
Lery
I.D.S.E Humanoid Interface [LSB]
Posts: 3343
Joined: Sun Nov 11, 2012 3:23 pm
Favourite Light Novel: Ahouka!
Location: Switzerland

Re: Rpapo's Translation Assistant.

Post by Lery »

Heck, that could well be... :oops: You've got to be right, what a noobies' mistake ! :oops:
Wiki user : Lery (talk)

Sysadmin, sometimes.
User avatar
rpapo
I.D.S.E Humanoid Interface [LSB]
Posts: 1530
Joined: Mon Dec 21, 2009 5:15 am
Favourite Light Novel: Ahouka!
Location: Michigan, USA
Contact:

Re: Rpapo's Translation Assistant.

Post by rpapo »

Lery wrote:Heck, that could well be... :oops: You've got to be right, what a noobies' mistake ! :oops:
Not even a newbie mistake, sometimes. It's very hard to tell with furigana, where the two tsu are visually identical.
Locked

Return to “Games & Computing”