Sigma and spelling correction

Main discussion forum
Post Reply
MadMax
Newbie
Newbie
Posts: 8
Joined: Mon Oct 22, 2012 7:12 pm

Sigma and spelling correction

Post 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...

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Sigma and spelling correction

Post 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.

MadMax
Newbie
Newbie
Posts: 8
Joined: Mon Oct 22, 2012 7:12 pm

Re: Sigma and spelling correction

Post 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

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Sigma and spelling correction

Post 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

MadMax
Newbie
Newbie
Posts: 8
Joined: Mon Oct 22, 2012 7:12 pm

Re: Sigma and spelling correction

Post by MadMax »

i don't know if i 'm missing something but i receive an error :

8.13 : Unknown identifier 'tg_GetField'

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Sigma and spelling correction

Post by jtclipper »

Save the code in an .sct file , then you should be able to execute it from the tag panel

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Sigma and spelling correction

Post by jtclipper »

Save the code in an .sct file , then you should be able to execute it from the tag panel

MadMax
Newbie
Newbie
Posts: 8
Joined: Mon Oct 22, 2012 7:12 pm

Re: Sigma and spelling correction

Post by MadMax »

ok it worked!

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

thanks for your help!

Post Reply