#11 2007-11-03 19:55

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Preset to check english misspelings

den4b wrote:

What exactly the "whole words" option is supposed to do?? hmm

"whole words"  (used in most text editors) is like the RegEx word boundery \b
i.e if i search for 'fun' ,... i don't want to find 'funny' too

So "Whole Words" means "Find Whole Words only" and search for RegEx \bfun\b

On the other side i may want to search for any 'fun' within 'funny' and 'fund' and 'function' , so i would disable "Whole Words only"

Sorry if this is an bad example. (i thought this would be an solution for Yogui problem too)


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#12 2007-11-06 13:15

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: Preset to check english misspelings

Well, you are nearly itching for swapping Replace rule for RegEx rule wink

Offline

#13 2008-04-18 11:51

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Preset to check english misspelings

Maybe Denis could add an option "[ ] Whole Words Only"  for 'Insert'-, 'Remove'-, 'Replace'-Rule

Nice speculation Stefan, I'm for this suggestion too roll

But, never mind if RegEx can do that task for me.

Here is mine example: The big bang may be a million years away         (rhyme from lyrics - .txt file)
                                  But i can't think of a better time to say...

I want to replace "i" with "I"... I'm using Analyze sample text option for this action.


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#14 2008-07-21 17:00

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Preset to check english misspelings

Just to remember you Denis to give your opinion about this suggestion. Thank you wink


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#15 2008-07-21 18:47

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Preset to check english misspelings

eR@SeR wrote:

I want to replace "i" with "I"...

Isn't this an issue for "case sensitive" option?

The "whole word"-option is meant for not renaming "ReNamer.exe" to "ReFiler.exe"
while searching for "name" and replacing with "File" but real "\bname\b" only




eraser> I'm using Analyze sample text option for this action.
What? big_smile ?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#16 2008-07-21 20:38

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Preset to check english misspelings

About the first post... What about using the "Translit" options, with something like this?...

abandonned=abandoned
aberation=aberration
abilties=abilities
abilty=ability
abondon=abandon
abondoned=abandoned
abondoning=abandoning
abondons=abandons
aborigene=aborigine
abortificant=abortifacient
abreviated=abbreviated
abreviation=abbreviation
abritrary=arbitrary
absense=absence
absolutly=absolutely
absorbsion=absorption
absorbtion=absorption
abundacies=abundances
abundancies=abundances
abundunt=abundant
abutts=abuts
acadamy=academy
acadmic=academic
accademic=academic
accademy=academy
acccused=accused
accelleration=acceleration
acceptence=acceptance
acceptible=acceptable
accessable=accessible
accidentaly=accidentally
accidently=accidentally
acclimitization=acclimatization
accomadate=accommodate
accomadated=accommodated
accomadates=accommodates
accomadating=accommodating
accomadation=accommodation
accomadations=accommodations
accomdate=accommodate
accomodate=accommodate
accomodated=accommodated
accomodates=accommodates
accomodating=accommodating
accomodation=accommodation
accomodations=accommodations
accompanyed=accompanied
accordeon=accordion
accordian=accordion
accoring=according
accoustic=acoustic
accquainted=acquainted
accross=across
accussed=accused
acedemic=academic
acheive=achieve
acheived=achieved
acheivement=achievement
acheivements=achievements
acheives=achieves
acheiving=achieving
acheivment=achievement
acheivments=achievements
achievment=achievement
achievments=achievements
achivement=achievement
achivements=achievements
acknowldeged=acknowledged
acknowledgeing=acknowledging
acomplish=accomplish
acomplished=accomplished
acomplishment=accomplishment
acomplishments=accomplishments
acording=according
acordingly=accordingly
acquaintence=acquaintance
acquaintences=acquaintances
acquiantence=acquaintance
acquiantences=acquaintances
acquited=acquitted
activites=activities
activly=actively
actualy=actually
acuracy=accuracy
acused=accused
acustom=accustom
acustommed=accustomed
adaption=adaptation
adaptions=adaptations
adavanced=advanced
adbandon=abandon
additinally=additionally
addmission=admission
addopt=adopt
addopted=adopted
addoptive=adoptive
addresable=addressable
addresed=addressed
addresing=addressing
addressess=addresses
addtion=addition
addtional=additional
adecuate=adequate
adhearing=adhering
adherance=adherence
admendment=amendment
admininistrative=administrative
adminstered=administered
adminstrate=administrate
adminstration=administration
adminstrative=administrative
adminstrator=administrator
admissability=admissibility
admissable=admissible
admited=admitted
admitedly=admittedly
adn=and
adolecent=adolescent
adquire=acquire
adquired=acquired
adquires=acquires
adquiring=acquiring
adres=address
adresable=addressable
adresing=addressing
adress=address
adressable=addressable
adressed=addressed
adventrous=adventurous
advertisment=advertisement
advertisments=advertisements
advesary=adversary
adviced=advised
aeriel=aerial
aeriels=aerials
afair=affair
afficianados=aficionados
afficionado=aficionado
afficionados=aficionados
affilate=affiliate
affilliate=affiliate
aforememtioned=aforementioned
againnst=against
agains=against
agaisnt=against
aganist=against
aggaravates=aggravates
aggreed=agreed
aggreement=agreement
aggregious=egregious
aggresive=aggressive
agian=again
agianst=against
agin=again
aginst=against
agravate=aggravate
agre=agree
agred=agreed
agreeement=agreement
agreemnt=agreement
agregate=aggregate
agregates=aggregates
agreing=agreeing
agression=aggression
agressive=aggressive
agressively=aggressively
agressor=aggressor
agricuture=agriculture
agrieved=aggrieved
ahev=have
ahppen=happen
ahve=have
aicraft=aircraft
aiport=airport
airbourne=airborne
aircaft=aircraft
aircrafts=aircraft
airporta=airports
airrcraft=aircraft
aisian=asian
albiet=albeit
alchohol=alcohol
alchoholic=alcoholic
alchol=alcohol
alcholic=alcoholic
alcohal=alcohol
alcoholical=alcoholic
aledge=allege
aledged=alleged
aledges=alleges
alege=allege
aleged=alleged
alegience=allegiance
algebraical=algebraic
algorhitms=algorithms
algoritm=algorithm
algoritms=algorithms
alientating=alienating
alledge=allege
alledged=alleged
alledgedly=allegedly
alledges=alleges
allegedely=allegedly
allegedy=allegedly
allegely=allegedly
allegence=allegiance
allegience=allegiance
allign=align
alligned=aligned
alliviate=alleviate
allopone=allophone
allopones=allophones
allready=already
allthough=although
alltime=all-time
almsot=almost
alochol=alcohol
alomst=almost
alotted=allotted
alowed=allowed
alowing=allowing
alreayd=already
alse=else
alsot=also
alternitives=alternatives
altho=although
althought=although
altough=although
alwasy=always
alwyas=always
amalgomated=amalgamated
amatuer=amateur
amendmant=amendment
amerliorate=ameliorate
amke=make
amking=making
ammend=amend
ammended=amended
ammendment=amendment
ammendments=amendments
ammount=amount
ammused=amused
amoung=among
amoungst=amongst
amung=among
analagous=analogous
analitic=analytic
analogeous=analogous
anarchim=anarchism
anarchistm=anarchism
anbd=and
ancestory=ancestry
ancilliary=ancillary
androgenous=androgynous
androgeny=androgyny
anihilation=annihilation
aniversary=anniversary
annoint=anoint
annointed=anointed
annointing=anointing
annoints=anoints
annouced=announced
annualy=annually
annuled=annulled
anohter=another
anomolies=anomalies
anomolous=anomalous
anomoly=anomaly
anonimity=anonymity
anounced=announced
ansalisation=nasalisation
ansalization=nasalization
ansestors=ancestors
antartic=antarctic
anthromorphization=anthropomorphization
anulled=annulled
anwsered=answered
anyhwere=anywhere
anyother=any other
anytying=anything
aparent=apparent
aparment=apartment
apenines=apennines
aplication=application
aplied=applied
apolegetics=apologetics
apparant=apparent
apparantly=apparently
appart=apart
appartment=apartment
appartments=apartments
appeareance=appearance
appearence=appearance
appearences=appearances
appenines=apennines
apperance=appearance
apperances=appearances
applicaiton=application
applicaitons=applications
appologies=apologies
appology=apology
apprearance=appearance
apprieciate=appreciate
approachs=approaches
appropiate=appropriate
appropraite=appropriate
appropropiate=appropriate
approproximate=approximate
approxamately=approximately
approxiately=approximately
approximitely=approximately
aprehensive=apprehensive
apropriate=appropriate
aproximate=approximate
aproximately=approximately
aquaintance=acquaintance
aquainted=acquainted
aquiantance=acquaintance
aquire=acquire
aquired=acquired
aquiring=acquiring
aquisition=acquisition
aquitted=acquitted
aranged=arranged
arangement=arrangement
arbitarily=arbitrarily
arbitary=arbitrary
archaelogists=archaeologists
archaelogy=archaeology
archetect=architect
archetects=architects
archetectural=architectural
archetecturally=architecturally
archetecture=architecture
archiac=archaic
archictect=architect
archimedian=archimedean
architechturally=architecturally
architechture=architecture
architechtures=architectures
architectual=architectural
archtype=archetype
archtypes=archetypes
aready=already
areodynamics=aerodynamics
argubly=arguably
arguement=argument
arguements=arguments
arised=arose
arival=arrival
armamant=armament
armistace=armistice
aroud=around
arrangment=arrangement
arrangments=arrangements
arround=around
artical=article
artice=article
articel=article
artifical=artificial
artifically=artificially
artillary=artillery
arund=around
asetic=ascetic
asign=assign
aslo=also
asociated=associated
asorbed=absorbed
asphyxation=asphyxiation
assasin=assassin
assasinate=assassinate
assasinated=assassinated
assasinates=assassinates
assasination=assassination
assasinations=assassinations
assasined=assassinated
assasins=assassins
assassintation=assassination
assemple=assemble
assertation=assertion
asside=aside
assisnate=assassinate
assit=assist
assitant=assistant
assocation=association
assoicate=associate
assoicated=associated
assoicates=associates
assosication=assassination
asssassans=assassins
assualt=assault
assualted=assaulted
assymetric=asymmetric
assymetrical=asymmetrical
asteriod=asteroid
asthetic=aesthetic
asthetical=aesthetical
asthetically=aesthetically
asume=assume
aswell=as well
atain=attain
atempting=attempting
atheistical=atheistic
athenean=athenian
atheneans=athenians
athiesm=atheism
athiest=atheist
atorney=attorney
atribute=attribute
atributed=attributed
atributes=attributes
attemp=attempt
attemped=attempted
attemt=attempt
attemted=attempted
attemting=attempting
attemts=attempts
attendence=attendance
attendent=attendant
attendents=attendants
attened=attended
attension=attention
attitide=attitude
attributred=attributed
attrocities=atrocities
audeince=audience
austrailia=australia
austrailian=australian
auther=author
authobiographic=autobiographic
authobiography=autobiography
authorative=authoritative
authorites=authorities
authorithy=authority
authoritiers=authorities
authoritive=authoritative
authrorities=authorities
autochtonous=autochthonous
autoctonous=autochthonous
automaticly=automatically
automibile=automobile
automonomous=autonomous
autor=author
autority=authority
auxilary=auxiliary
auxillaries=auxiliaries
auxillary=auxiliary
auxilliaries=auxiliaries
auxilliary=auxiliary
availablity=availability
availaible=available
availble=available
availiable=available
availible=available
avalable=available
avalance=avalanche
avaliable=available
avation=aviation
avengence=a vengeance
averageed=averaged
avilable=available
awared=awarded
awya=away

No one has suggested anything about this, and I'm wondering if there is any problem to do it this way...
roll


If this software has helped you, consider getting your pro version. :)

Offline

#17 2008-07-22 00:07

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Preset to check english misspelings

eR@SeR wrote:

Here is mine example: The big bang may be a million years away         (rhyme from lyrics - .txt file)
                                  But i can't think of a better time to say...

I want to replace "i" with "I"... I'm using Analyze sample text option for this action.

What is ambiguously about this?

How could be this for Case sensitive option? Explain me please i.e. give me a solution for this problem???

I said that I'm using .txt file:

1) Whole song is selected from .txt file (Bob Sinclar - World Hold On)
2) Then it's copied into analyze name (both checkbox are checked)

If I use Replace rule: Find: i Replace: I, (Occurencess: first) then the text will be:

The bIg bang may be a million years away
But I can't think of a better time to say

Whole words option should rename only I "surrouded" by spaces (bolded one).

But another question is posted by yours...

Shouldn't option "Force Case for fragments" interpret DJ DVD CD...Only if they alone like:

1) Ex: Dj Antoine ----> will be DJ Antoine

NOT

2) Ex: DjAntoine -----> will be DJAntoine   (it should be the same as it before adding "Force Case for fragments")

That is mine new suggestion big_smile


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#18 2008-07-22 11:00

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Preset to check english misspelings

Ahh,

i thought about case for "i" and "I" only...

... but you talked about the "i" in f.ex. "big" "think" "time"

I think now i understand


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#19 2008-07-22 11:52

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Preset to check english misspelings

Glad to hear that big_smile

What is your opinion about this suggestion?

Stefan wrote:

Maybe Denis could add an option "[ ] Whole Words Only"  for 'Insert'-, 'Remove'-, 'Replace'-Rule

It's strange to me how you didn't continue in realization "Whole words" into Insert, Remove & Replace rule???

Edit: I'm not sure, correct me, if is possible to add into Insert rule "Whole words" option.
I cannot see an usage in there... hmm

It's an excellent new feature, don't you think? cool

Last edited by eR@SeR (2008-07-22 12:04)


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#20 2008-07-23 18:26

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: Preset to check english misspelings

I will consider implememnting "Whole words" option, but until it is implemented here is a script to do the job. All you need to do is to put "misspelled.txt" file in the same directory as ReNamer, and add single PascalScript rule (below). At the moment replacement is done using RegEx and "\b" meta characters, which isn't the most efficent way. So one can simply change this behaviour by rewriting ReplaceWholeWord() procedure.

"misspelled.txt" file should have the same format as described in the first post, i.e.:

::abandonned::abandoned
::aberation::aberration
::abilties::abilities
.........

Anyway, here is the script:

const
  FILE = 'misspelled.txt';
  DELIM = '::';
  
var
  WordsBad, WordsGood: TStringsArray;
  Initialized: Boolean;
  
procedure Initialize;
var
  I: Integer;
  Content: String;
  Lines, Words: TStringsArray;
begin
  Content := FileReadContent(FILE);
  Lines := WideSplitString(Content, #13#10);
  for I:=0 to Length(Lines)-1 do
    if DELIM = WideCopy(Lines[i], 1, Length(DELIM)) then
      begin
        Words := WideSplitString(Lines[i], DELIM);
        if Length(Words) = 3 then
        begin
          SetLength(WordsBad, Length(WordsBad)+1);
          SetLength(WordsGood, Length(WordsGood)+1);
          WordsBad[High(WordsBad)] := Words[1];
          WordsGood[High(WordsGood)] := Words[2];          
        end;
      end;
  Initialized := True;
end;

procedure ReplaceWholeWord(var S: WideString; const Find, Replace: WideString);
begin
  S := ReplaceRegEx(S, '\b'+Find+'\b', Replace, False, False); 
end;

procedure FixSpelling(var S: WideString);
var
  I: Integer;
begin
  for I:=0 to Length(WordsBad)-1 do
    ReplaceWholeWord(S, WordsBad[i], WordsGood[i]);
end;
  
begin
  if not Initialized then
    Initialize;
  FixSpelling(FileName);
end.

P.S. For later reference, this script works with ReNamer 5.30.

Offline

Board footer

Powered by FluxBB