How can I count number of only English words in a Word document mixed with English words and words in another language?

How can I count number of only English words in a Word document mixed with English words and words in another language?

I received a Word document that was 50 % translated already, and the remaining words were in the source language English. So my task is to translate the remaining words in English, and the customer wants me to give him a word count on these remaining English words. Is there any simple way of doing this? The total word count is 4,402 words.

I have MS Word 2007.
LVL 1
hermesalphaAsked:
Who is Participating?
 
GrahamSkanRetiredCommented:
VBA macro code would be something like this:
Sub TranslatedCount()
    Dim iEnglishWords As Integer
    Dim iSwedishWords As Integer
    
    ActiveDocument.Range.LanguageID = wdSwedish
    iEnglishWords = ActiveDocument.SpellingErrors.Count
    ActiveDocument.Range.LanguageID = wdEnglishUK
    iSwedishWords = ActiveDocument.SpellingErrors.Count
    MsgBox "Untranslated English words approx: " & iSwedishWords - iEnglishWords
End Sub

Open in new window

0
 
GrahamSkanRetiredCommented:
Are the words in blocks, or somehow arranged so that they can  easily be to selected separately by the user or programatically?
Or are you using the spellchecker so that with the English Words set to an English variant, and the other words set to the other language?
0
 
BillDLCommented:
Hi hermesalpha

What language was the original document before it was partially translated into English.  From memory you are fluent in some of the Chinese dialects (Cantonese or Mandarin), but I seem to remember that you also speak Swedish.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
hermesalphaAuthor Commented:
The problem is that the translated sentences are completely mixed in the text with the untranslated sentences. So whole sentences are either untranslated or translated, but there is no pattern to this such as a whole chapter with only untranslated or translated. So there is no way to easily separate the untranslated sentences from the translated sentences without going through row by row.

I think the spellchecker can only be set to one language at a time, and it was on English.

The original document was in English, and the parts that has been translated are in Swedish language.

Mandarin, not fluent exactly, but I can understand it pretty well in writing.
0
 
GrahamSkanRetiredCommented:
Still trying to understand the format. Are you saying that you started with Swedish text and sometimes interspersed it with English words in the same font? Sounds difficult to read, if nothing else.
If that is the case, I would experiment with two spellchecking passes, and assume that words indicated as misspelled belong to the other language.

Foe a very rough result, you can subtract the number of Swedish misspellings (English words) from the number of English misspellings (Swedish words) and you are left with the number of Swedish words still untranslated.
0
 
GrahamSkanRetiredCommented:
Sorry. just re-read your penultimate paragraph and realise that I've  have got it the wrong way around. You are going English to Swedish. My answer was for Swedish to English..
0
 
hermesalphaAuthor Commented:
Thanks for the VBA GrahamSkan!
0
 
GrahamSkanRetiredCommented:
Thanks hermesalpha. I'd really like to know how successful it was,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.