Macro for correcting specific frequent spelling mistakes
Thread poster: ahmadwadan.com
ahmadwadan.com
ahmadwadan.com  Identity Verified
Saudi Arabia
Local time: 18:16
English to Arabic
+ ...
Jun 26, 2008

Hi,

I need a Macro for correcting specific frequent spelling mistakes which I already know and have a list of.

Lets say that you frequently receive files of almost the same spelling mistakes such as:

adn>>and
financail>>financial
to gether>>together …etc

What I need is a macro to automatically fix such mistakes in source before starting translation so matching percentage of Trados gets high.

Note: the macro is suppose
... See more
Hi,

I need a Macro for correcting specific frequent spelling mistakes which I already know and have a list of.

Lets say that you frequently receive files of almost the same spelling mistakes such as:

adn>>and
financail>>financial
to gether>>together …etc

What I need is a macro to automatically fix such mistakes in source before starting translation so matching percentage of Trados gets high.

Note: the macro is supposed to have a control to convert “whole words” so it will not make a mess of correct words. For example: it is not supposed to convert “adn” to "and" when it occurs in “adnan”

Thank you so much
I appreciate your help

Ahmad Wadan
Financial Translator
Collapse


 
Wolfgang Jörissen
Wolfgang Jörissen  Identity Verified
Belize
Dutch to German
+ ...
Easy task for the macro recorder in Word Jun 26, 2008

... which produced this:

Sub SpellReplace()
'
' SpellReplace Makro
' Makro zapisane 6/26/2008 przez Wolfgang Jörissen
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "adn"
.Replacement.Text = "and"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.Match
... See more
... which produced this:

Sub SpellReplace()
'
' SpellReplace Makro
' Makro zapisane 6/26/2008 przez Wolfgang Jörissen
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "adn"
.Replacement.Text = "and"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "financail"
.Replacement.Text = "financial"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "to gether"
.Replacement.Text = "together"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Collapse


 
Tony M
Tony M
France
Local time: 17:16
Member
French to English
+ ...
SITE LOCALIZER
I have a beta version of a little program that does this Jun 26, 2008

The only snag is, since it is still only in development, the list of words and corrections has to be entered manually, which is fiddly and tedious if the list is very long.

If no other solution comes to light, this might be of some interest.

(NB: it doesn't cope very well with the 'whole words only' issue, but there is a sort of fudge that helps a bit.)


 
Wolfgang Jörissen
Wolfgang Jörissen  Identity Verified
Belize
Dutch to German
+ ...
Whole words Jun 26, 2008

The "whole words" issue should not be a big deal, since Word has the "Search for whole words only" option in the Search/replace window. In the macro, this is reflected as .MatchWholeWord = True

 
ahmadwadan.com
ahmadwadan.com  Identity Verified
Saudi Arabia
Local time: 18:16
English to Arabic
+ ...
TOPIC STARTER
Great! Jun 26, 2008

Wolfgang Jörissen wrote:

... which produced this:

End Sub


Dear Wolfgang,

This is exactly what I need. It works for English text. Now I am working to apply this to Arabic text but Arabic characters appear scrambled (encoding issue) in Visual Basic Editor so it did not work for Arabic. I wish you have a solution for this.

Thank you so much


 
Wolfgang Jörissen
Wolfgang Jörissen  Identity Verified
Belize
Dutch to German
+ ...
Try recording it yourself Jun 26, 2008

That's all I did. Not sure about the exact commands in the English Word version, but AFAIK, it's Tools - Macro - Record.

 
ahmadwadan.com
ahmadwadan.com  Identity Verified
Saudi Arabia
Local time: 18:16
English to Arabic
+ ...
TOPIC STARTER
Codes for Arabic characters Jun 26, 2008

Wolfgang Jörissen wrote:

That's all I did. Not sure about the exact commands in the English Word version, but AFAIK, it's Tools - Macro - Record.


Yes, I tried this, but the problem with Arabic is that Macro replace Arabic characters with numbers so I can not know which is which. For example: you may find an Arabic word represented by a code "251897".

Thank you Wolfgang


 
Wolfgang Jörissen
Wolfgang Jörissen  Identity Verified
Belize
Dutch to German
+ ...
Maybe... Jun 26, 2008

Well, I am not an expert and my knowledge of Arabian is limited to Salam and Shukran, but maybe this helps? http://unicode.org/charts/PDF/U0600.pdf

 
ahmadwadan.com
ahmadwadan.com  Identity Verified
Saudi Arabia
Local time: 18:16
English to Arabic
+ ...
TOPIC STARTER
Just change font to view Arabic Jun 26, 2008

From Macro editor click Tools>>Options>>Edit Format>> then select an Arabic font on the right.

Kind regards


 
Yaotl Altan
Yaotl Altan  Identity Verified
Mexico
Local time: 09:16
Member (2006)
English to Spanish
+ ...
Macro Jun 26, 2008

Is it necessary a macro?
Maybe you onle y have to sustitute words in the Correction section.


 
FarkasAndras
FarkasAndras  Identity Verified
Local time: 17:16
English to Hungarian
+ ...
no Jun 26, 2008

No, Ahmad wants to correct his source texts, not the typos he himself makes.

By the way, than you for that, Wolfgang. I'll have to experiment with the macro recorder myself, too...


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Macro for correcting specific frequent spelling mistakes






Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »