Spell Check in MS Word using PERL OLE


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Spell Check in MS Word using PERL OLE
# 1  
Old 05-12-2009
Spell Check in MS Word using PERL OLE

Hi,

I am trying automate couting number of spell and typo errors in MS Word document using perl script.

In perl script, i am using Win32::OLE module of perl to read MS word document.

Can anybody tell me are there any modules available in perl which can be imported into my script to check these typo errors.


Thanks in adavance..

Regards,
123an
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Spell Check

I have this assignment and I am not sure how to start it, I am new any help will be appreciated.... (BASH) Let us say a test is conducted to assess the typing speed for applicants. We need to count # of correctly spelled words and penalize for incorrectly spelled words. score = (# of... (1 Reply)
Discussion started by: shilling
1 Replies

2. Shell Programming and Scripting

Perl syntax and html ole parsing

Hi gurus I am trying to understand some advanced (for me) perl constructions (syntax) following this tutorial I am trying to parse html: Using Mojo::DOM | Joel Berger say "div days:"; say $_->text for $dom->find('div.days')->each; say "\nspan hours:"; say $_->text for... (1 Reply)
Discussion started by: wakatana
1 Replies

3. Programming

Perl OLE Selection property iteration in cycle

Hi gurus, i am trying to write simple perl script using win32 ole which will iterate over all M$ word paragraphs (any text that ends with a hard return) and print only those paragraphs that matches the specified condition. The problem is that I need to access font size property. It seems to me that... (0 Replies)
Discussion started by: wakatana
0 Replies

4. Shell Programming and Scripting

win32 ole in deepr details in perl

Hello Gurus, I am begginer in perl. I would like to ask several questions, some related to perl and its syntax but most will be regarding to WIN32 OLE. My main goal is to develop script that will check word document structure (return some information) and make some changes in this document (if it... (0 Replies)
Discussion started by: wakatana
0 Replies

5. Shell Programming and Scripting

PERL Win32::OLE Inserting Picture in Excel

I am trying to insert a picture into a worksheet in Excel using Perl the following is the code use Win32::OLE; use Win32::OLE::Const "Microsoft Excel"; use Win32::OLE qw(in with); # Initiate Excel application $Excel = Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{Visible} =1; #... (1 Reply)
Discussion started by: cold_Que
1 Replies

6. Shell Programming and Scripting

OLE ERROR in perl

Hello All, I have executed one script where i am getting this error,what may be the reason..... please help me out. OLE exception from Microsoft Excel Win32::OLE(0.1403) error 0x800a03ec in METHOD/PROPERTYGET "open" (1 Reply)
Discussion started by: suvenduperl
1 Replies

7. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

8. Shell Programming and Scripting

spell check program

hi, i need to write a spell check program in bash to find all possible spelling errors in a file or a number of files taken as input using usr/dict/words. whenever the program encounters a spelling error, it must state the line number at which the incorrect spelling has occured and... (1 Reply)
Discussion started by: kratos.
1 Replies

9. UNIX for Dummies Questions & Answers

spell check

# cat wrong.txt thiis is going to be wrong words containing file # aspell list < wrong.txt thiis I want to check only one word and see the first suggestions ("this" in this case). something like... aspell list --one-word thiis --suggest (5 Replies)
Discussion started by: shantanuo
5 Replies

10. Post Here to Contact Site Administrators and Moderators

Spell Check

Administrator/Moderators, I would like to put forth a request rather a suggestion in other words. How about the inclusion of 'SPELL CHECK' tool along with existing submit reply and preview post tools? I believe that would be very much helpful in understanding questions clearly deprived of... (2 Replies)
Discussion started by: matrixmadhan
2 Replies
Login or Register to Ask a Question
Spell(3pm)						User Contributed Perl Documentation						Spell(3pm)

NAME
Pod::Spell -- a formatter for spellchecking Pod SYNOPSIS
% podspell Thing.pm | ispell or if you don't have a podspell: % perl -MPod::Spell -e "Pod::Spell->new->parse_from_file(shift)" Thing.pm |spell |fmt or: % perl -MPod::Spell -e "Pod::Spell->new->parse_from_filehandle" ...which takes POD on STDIN and sends formatted text to STDOUT ...or instead of piping to spell or ispell, use ">temp.txt", and open temp.txt in your word processor for spell-checking. DESCRIPTION
Pod::Spell is a Pod formatter whose output is good for spellchecking. Pod::Spell rather like Pod::Text, except that it doesn't put much effort into actual formatting, and it suppresses things that look like Perl symbols or Perl jargon (so that your spellchecking program won't complain about mystery words like "$thing" or ""Foo::Bar"" or "hashref"). This class provides no new public methods. All methods of interest are inherited from Pod::Parser (which see). The especially interesting ones are "parse_from_filehandle" (which without arguments takes from STDIN and sends to STDOUT) and "parse_from_file". But you can proba- bly just make do with the examples in the synopsis though. This class works by filtering out words that look like Perl or any form of computerese (like "$thing" or ""N>7"" or ""@{$foo}{'bar','baz'}"", anything in C<...> or F<...> codes, anything in verbatim paragraphs (codeblocks), and anything in the stopword list. The default stopword list for a document starts out from the stopword list defined by Pod::Wordlist, and can be supplemented (on a per-document basis) by having "=for stopwords" / "=for :stopwords" region(s) in a document. ADDING STOPWORDS
You can add stopwords on a per-document basis with "=for stopwords" / "=for :stopwords" regions, like so: =for stopwords plok Pringe zorch snik !qux foo bar baz quux quuux This adds every word in that paragraph after "stopwords" to the stopword list, effective for the rest of the document. In such a list, words are whitespace-separated. (The amount of whitespace doesn't matter, as long as there's no blank lines in the middle of the para- graph.) Words beginning with "!" are deleted from the stopword list -- so "!qux" deletes "qux" from the stopword list, if it was in there in the first place. Note that if a stopword is all-lowercase, then it means that it's okay in any case; but if the word has any capital letters, then it means that it's okay only with that case. So a wordlist entry of "perl" would permit "perl", "Perl", and (less interest- ingly) "PERL", "pERL", "PerL", et cetera. However, a wordlist entry of "Perl" catches only "Perl", not "perl". So if you wanted to make sure you said only "Perl", never "perl", you could add this to the top of your document: =for stopwords !perl Perl Then all instances of the word "Perl" would be weeded out of the Pod::Spell-formatted version of your document, but any instances of the word "perl" would be left in (unless they were in a C<...> or F<...> style). You can have several "=for stopwords" regions in your document. You can even express them like so: =begin stopwords plok Pringe zorch snik !qux foo bar baz quux quuux =end stopwords If you want to use E<...> sequences in a "stopwords" region, you have to use ":stopwords", as here: =for :stopwords virtE<ugrave> ...meaning that you're adding a stopword of "virtu". If you left the ":" out, that'd mean you were adding a stopword of "virtE<ugrave>" (with a literal E, a literal <, etc), which will have no effect, since any occurrences of virtE<ugrave> don't look like a normal human- language word anyway, and so would be screened out before the stopword list is consulted anyway. USING Pod::Spell My personal advice: o Write your documentation in Pod. Pod is described in perlpod. And perlmodstyle has some advice on content. This is the stage where you want to make sure you say everything you should, have good and working examples, and have coherent grammar. o Run it through podchecker. This will report all sorts of problems with your Pod; you may choose to ignore some of these problems. Some, like "*** WARNING: Unknown entity E<qacute>...", you should pay attention to. o Once podchecker errors have been tended to, spellcheck the pod by running it through podspell / Pod::Spell. For any misspellings that are reported in the Pod::Spell-formatted text, fix them in the original. Repeat until there's no complaints. o Run it through podchecker again just for good measure. SEE ALSO
Pod::Wordlist Pod::Parser podchecker also known as Pod::Checker perlpod, perlpodspec HINT
If you feed output of Pod::Spell into your word processor and run a spell-check, make sure you're not also running a grammar-check -- because Pod::Spell drops words that it thinks are Perl symbols, jargon, or stopwords, this means you'll have ungrammatical sentences, what with words being missing and all. And you don't need a grammar checker to tell you that. COPYRIGHT AND DISCLAIMER
Copyright (c) 2001 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The programs and documentation in this dist are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. AUTHOR
Sean M. Burke "sburke@cpan.org" perl v5.8.8 2001-10-27 Spell(3pm)