Mobile menu

Macro for correcting specific frequent spelling mistakes
Thread poster: ahmadwadan.com

ahmadwadan.com  Identity Verified
Kuwait
Local time: 11:20
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 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


Direct link Reply with quote
 

Wolfgang Jörissen  Identity Verified
Belize
Member
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
.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


Direct link Reply with quote
 

Tony M  Identity Verified
France
Local time: 09:20
Member
French to English
+ ...
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.)


Direct link Reply with quote
 

Wolfgang Jörissen  Identity Verified
Belize
Member
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

Direct link Reply with quote
 

ahmadwadan.com  Identity Verified
Kuwait
Local time: 11:20
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


Direct link Reply with quote
 

Wolfgang Jörissen  Identity Verified
Belize
Member
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.

Direct link Reply with quote
 

ahmadwadan.com  Identity Verified
Kuwait
Local time: 11:20
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


Direct link Reply with quote
 

Wolfgang Jörissen  Identity Verified
Belize
Member
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

Direct link Reply with quote
 

ahmadwadan.com  Identity Verified
Kuwait
Local time: 11:20
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


Direct link Reply with quote
 

Yaotl Altan  Identity Verified
Mexico
Local time: 02:20
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.


Direct link Reply with quote
 
FarkasAndras
Local time: 09:20
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...


Direct link Reply with quote
 


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

Advanced search






LSP.expert
You’re a freelance translator? LSP.expert helps you manage your daily translation jobs. It’s easy, fast and secure.

How about you start tracking translation jobs and sending invoices in minutes? You can also manage your clients and generate reports about your business activities. So you always keep a clear view on your planning, AND you get a free 30 day trial period!

More info »
Across v6.3
Translation Toolkit and Sales Potential under One Roof

Apart from features that enable you to translate more efficiently, the new Across Translator Edition v6.3 comprises your crossMarket membership. The new online network for Across users assists you in exploring new sales potential and generating revenue.

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs