Page 1 of 1

Sigma and spelling correction

Posted: Mon Oct 22, 2012 7:26 pm
by MadMax
Hello,

I use a replacement matrix to convert file names from greeklish to Greek characters.
Is there any way for the last "σ" of the words to change to "ς" ?

Additionally is there any way to integrate any Greek vocabulary or better a spell checking to TGF in order to have the ultimate greeklish to Greek conversion tool? There is a mess with ι-υ-ο-ω etc...

Re: Sigma and spelling correction

Posted: Mon Oct 22, 2012 11:12 pm
by jtclipper
For 'σ' το 'ς', you can add an entry like 's ' -> 'ς ' to take advantage of the space after the word.
As for a dictionary feature not at the moment sorry. It would be a nice feature in general and i might look into it.

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 12:57 am
by MadMax
very useful tip this one!

However there is also no conversion when the "s" is at at the end of the file name:

XXXXXs.mp3

although i add an entry like "s."--> "ς." Is there any solution for something like that?

thank you

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 1:09 pm
by jtclipper
You can use a script in this case

Code: Select all

program sigma;

var
  sTmp: string;

  procedure _sigma( sField: string );
  begin
    sTmp := tg_GetField( sField );
    if Copy( sTmp, Length( sTmp), 1 ) = 's' then begin
       tg_setField( sField, Copy( sTmp, 1, Length( sTmp ) - 1 ) + 'ς' );
    end;
  end;
begin

  if not tg_Init then exit; // no rows get out

  repeat
    _sigma( 'Title' );
    _sigma( 'Artist' );
    _sigma( 'Album' );
    _sigma( 'Comment' );
  until not tg_Skip;

end.
Just do the scan and then use this script

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 6:33 pm
by MadMax
i don't know if i 'm missing something but i receive an error :

8.13 : Unknown identifier 'tg_GetField'

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 7:30 pm
by jtclipper
Save the code in an .sct file , then you should be able to execute it from the tag panel

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 7:30 pm
by jtclipper
Save the code in an .sct file , then you should be able to execute it from the tag panel

Re: Sigma and spelling correction

Posted: Tue Oct 23, 2012 11:41 pm
by MadMax
ok it worked!

i tried to run as .scn file from rename panel before.

thanks for your help!