Batch spell checking

One of my program's tasks is to spell check a large number of unique strings per session, each string approx. a sentence long.
I chose to use the Jazzy API to accomplish this. Unfortunately I found that this method takes significantly longer. A process taking 5 seconds takes about 30 minutes using the spell check.
//Spell Check class that implements Jazzy, an open source API
import com.swabunga.spell.event.*;
import com.swabunga.spell.engine.*;
import java.io.*;
import java.util.*;
public class SpellCheck implements SpellCheckListener
  private final String DICTIONARY_FILE = "Dictionary/english.0";
  private SpellChecker spellChecker;
  private ArrayList listOfMisspelledWords;
  public SpellCheck(String description)
    createDictionary();
    spellChecker.addSpellCheckListener(this);
    // Check Spelling
    StringWordTokenizer texTok =
       new StringWordTokenizer(description, new TeXWordFinder());
    populateListOfMisspelledWords(texTok);
    printWordsInMisspelledList();
  private void createDictionary()
    File dict = new File(DICTIONARY_FILE);
    try
      spellChecker = new SpellChecker(new SpellDictionaryHashMap(dict));
    catch (FileNotFoundException e)
      System.err.println("Dictionary File '" + dict + "' not found! Quitting. " + e);
      System.exit(1);
    catch (IOException ex)
      System.err.println("IOException occurred while trying to read the dictionary file: " + ex);
      System.exit(2);
  private void populateListOfMisspelledWords(StringWordTokenizer texTok)
    listOfMisspelledWords = new ArrayList();
    spellChecker.checkSpelling(texTok);
  private void printWordsInMisspelledList()
    Iterator it = listOfMisspelledWords.iterator();
    while (it.hasNext())
      System.out.println("Misspelled: " + it.next());
  public void spellingError(SpellCheckEvent event)
    event.ignoreWord(true);
    listOfMisspelledWords.add(event.getInvalidWord());
  public void check(String description){
    description = description;
    new SpellCheck(description);
}Is there a better way to perform this kind of spell check?
Thanks

Check Mail Preferences/Composing to see what is select with regard to Spell Check?
Ernie

Similar Messages

  • Spell Check Entire Site

    Hi,
    Just created over 300 pages in Dreamweaver, and now want to
    spell check. Is there a way to spell check the entire site? I can't
    seriously believe that the only way to do it is to open each page.
    After all if Find and Replace works on all files why doesn't Spell
    Check?
    What is everyone else doing? Is there an extension I need to
    install?
    Thanks much
    CC

    Eh? Are you using DW12? 8)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Katsuey" <[email protected]> wrote in
    message
    news:f8b2g1$bnp$[email protected]..
    >> Just created over 300 pages in Dreamweaver, and now
    want to spell check.
    >> Is
    >> there a way to spell check the entire site? I can't
    seriously believe
    >> that the
    >> only way to do it is to open each page. After all if
    Find and Replace
    >> works on
    >> all files why doesn't Spell Check?
    >
    > Use Text | Batch Spell Check and then select the entire
    current
    > local site if not already selected.
    >

  • How can I Spell Check with an Action?

    Hi -
    I can use the Spell Checking command while I'm recording a new Action but when I play that
    Action it gets stuck on the first step... "Spell Check in contents of all text layer".  I didn't write that first step - PShop did while I was recording the Action.  Whe I try to use the Action I get an alert ... "The object "in contents of all text layer" is not currently available."
    If I hit Stop - the Action stops.
    If I hit Continue - the Action stops.
    So how do I Spell check using an Action?  I plan to use this in a batch process. I have about 300 files and automating this would be great.
    TIA any insight,
    JL
    --Photoshop CS5, Win 7

    See if using Insert Menu Item works for the spell check.

  • Spell Check Dreamweaver cs4

    For spell check in CS4 besides "shift F7", is there a way to setup so that spell checks while I am typing ?
    TIA
    Carl,

    That's a bummer...
    I was thinking of switching to Dreamweaver because it's Live View and limited excess tagging.
    I"m rethinking that now... 
    I work in numerous systems that require web based editing of text (Drupal for one).  These web based editors are a pain when it comes to spell checking!  I type fast and some of my fingers are actually faster than others.  My typical typo is a word that has all the correct letters, but with a couple letters mixed (for example, I might have an 'i' before a 't' instead of after).
    I've come to rely on Word helping me to deal with this idiosyncrasy by underlining the misspellings as I've gotten used to for most other editing environments that operate locally on my PC.  I'm going to have to re-think that process now...  I may just stick with Web Expressions which is better about extraneous tags than Front Page was, but doesn't display the Drupal templates as I'd prefer.
    I agree that DW should have the in-line spell check - it would not require any additional HTML in the code, would help the developer significantly and is basically a check-list item for most other editing environments where text is a key form of communication!
    I understand there is a spell checker that can be done in batch mode - that's great.  However, most of the environments where I do my editing (including many, but not all web pages through some Google add-ins) on both Mac and Windows systems have in-line spell checking...

  • Spell Check Doclet

    I have created a Doclet which people may find useful. It allows you to spell check your JavaDoc. It is very simple and easy to use. It is available for free, open-source download at http://www.softframeworks.com/download/download.php

    Hi, i have downloaded the spell check doclet and have also changed the batch file to suit my needs. But the problem is i dont see any output file getting created even when i run the batch command through the command prompt. Can you please tell me the steps involved in using this doclet?
    Thanks in advance.

  • I can't use word because a box keeps popping up saying that it can't find the spell check files?

    I open Word and there is a pop-up message saying that word cannot start the spelling checker because the files may be missing and to make sure that the spell checker files are installed or use the Microsoft installer to install spell checker. I have never had this problem with Word before and spell check has always been fine. What should I do?

    Since word is made by Microsoft you should post your question on their own forums for their Mac software as Apple Communities only provide support for Apple products:
    http://www.officeformac.com/productforums

  • Pages 08 Spell Checker Not Working

    When I started using Pages 08, I turned on the Spelling --> Check Spelling As You Type. One day it stopped to work, in fact I do not know whether it is working or not since the red lines that highlighted incorrectly-spelled text no longer appeared. I tried turning the feature on and off several times, and fiddled with Text Inspector, but have foind no solution to this. Please advise, anyone. Thanks.

    Repairing Permissions did not do anything for me. I have tried various and other sundry things as found in other messages about this major issue w/ Pages, but to no avail. Spell check works fine in other apps, TextEdit for example.

  • Pages 08 spell checker not working after pasting in a windows document.

    I am working Pages 08. I pasted a Windows document ( Microsoft word I am assuming ? ) that I saved from another email account(not safari,school based) into my Pages document. Now the spell checker will not work in the Pages document only, Works fine everywhere else. Even if I paste the Pages text into a new document the checker will not work in the document. Any suggestions /

    I figured it out. The language was set to none in the inspector

  • Pages 08 - Spell check as you type has stopped working

    Hi,
    My Pages 08, which is ticked to 'check spelling whilst typing' is no longer checking spelling as I type.
    It was working fine yesterday, but has stopped today.
    Moreover, it's not even spell checking when I ask it to do it manually.
    Can anyone help?
    Regards,
    Mont3

    I didn't install the British English language on my machines so I can't check the behavior of Pages when this language is the first one.
    Here is the brute force way describer for the Blank template used in WP mode.
    It would be the same for others.
    ctrl click the Pages.app icon
    show package's contents
    open Contents
    open Resources
    open Templates
    open Blank
    ctrl click Blank.template
    duplicate index-iso.xml.gz or index-trad.xml.gz in a safe area (folder named Pages-Blank-template ).
    double click index-iso.xml.gz or index-trad.xml.gz
    You will get index-iso.xml or index-trad.xml
    Open it with TextEdit or TextWrangler for instance.
    Search for
    <sf:language><sf:null/></sf:language>
    Replace all occurences by
    <sf:language><sf:string sfa:string="en_GB"/></sf:language>
    save index-iso.xml or index-trad.xml
    for English, the replacement string would be:
    <sf:language><sf:string sfa:string="en"/></sf:language>
    for French it would be:
    <sf:language><sf:string sfa:string="fr"/></sf:language>
    for Spanish it would be:
    <sf:language><sf:string sfa:string="sp"/></sf:language>
    The next time you will use this template, it will default to British English everywhere.
    Yvan KOENIG (from FRANCE mardi 16 septembre 2008 16:44:00)

  • System-wide spell check will not work

    Hi,
    I can't get the system-wide spell check to work on my MacBook Pro with the Command + Shift + ; (semicolon) keys. Does anyone know of a solution to this problem? The Spell-Check on the Fly will work.
    Thank You,
    Guy

    I was able to zap the pram and that solved the problem.
    Guy

  • I updated to firesfox 4.0.1 and now spell check doesnt work and cant find one that does. Can I go back to the previous one that worked properly?

    I changed to firefox because I wanted spell checker. After updating to 4.0.1 this no longer works. I cant find a version that does work with the new firefox. Is it time i went back to explorer?

    tried that and it says not compatable with firefox 4.0.1

  • How can I get Apple to pay attention to improving spell check and grammar?

    I love this company and the products they develop.   I am embarrassed at the number of Apple products that I have at this point.  However, I have to say that the spelling and grammar check on Mac Mail is awful.  I am a terrible speller, and am constantly forced to go to Google to find the correct spelling of a word that seems to totally confuse Apple spell check.  But here is the thing, you often need only have one letter missing or incorrect for Mac's spell check to show no results. 
    For example: cannibalize.   Try spelling it with one "n" and the spell check will show NO results.  Use two N's correctly, but replace the "i" with an "a" and again it is completely useless.  Obviously, this is ridiculous.  What good is a spell check that get's confused if you are one letter off of the correct spelling?  There are thousands of these examples, and sadly, I seem to find them all. 
    Moreover, when it does have suggestions, they are in a ridiculous order as well.   If it suggest 5 or six words, it generally seems to suggest extremely long tail (rare) words first, and the have the most commonly used words listed last (or again, not at all).  
    Grammar is similarly awful.   It is the ONE area as far as I am concerned that is clearly better on Windows and Google Apps, and yet seems so basic these days.  It's been around for 20 years for goodness sake. 
    I bring this up in the hopes that a truly motivated developer will fix core functionality.   In the meantime any tips for me (besides snarky advice about learning to spell).
    Rick

    I totally agree with you, I as well, cannot compose any complex messages in Mail, however I'm am stuck using a browser extension like "Gramercy" to assist me! Maybe after many replies Apple will address the issue

  • When I right click, I can't copy or spell check or open a tab in a new window.

    When I right click on a picture, it doesn't give me the option to copy or to view in another tab as a separate image from the web page it is on. I no longer have the option to spell check. When I highlight text to copy, it doesn't give me an option to copy it but only says "copy link location". I can open a new tab by holding down the control key and clicking the link I want open in a new tab but when I right click and click "Open in new tab" it does nothing. This started happening about a week ago.

    You can try to update to Firefox 21 that has been released today.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Why is my spell checker not working in a document using Word 2003

    I have a word document in Word 2003  .   I was altering it and noticed that from page 3 to 6 the spell checker does not work.
    I transferred the pages into another another file still didn't work .  Just copied a paragraph still didn't work.  So I then started typing the rest of the document into another file and straight away it underlined my spelling mistakes in red.
    So why not in these few pages of my document.
    This is a paragraph from the pages below.  I altered some words deliberately to see if my Word 2003 would pick them up.  It didn't. 
    The landlord shall be entitiled to pursue the tenant for any reasonable costs incurred as a result of the tenant’s faulure to pay rent including but not limited to any charges for returned cheques or any reasonable costs incurred
    in pursuing the tenant for payment of unpaid rent.
    But when I put it in here it does pick them up.  So it is something I have done .

    Hi,
    According to your description, this issue is more related to Word. The Word IT Pro Discussions forum is a better place for word questions, we will move it there for you.
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Text and spell check in languages other than English

    I am a linguist who writes papers primarily in English, but which contain a significant number of words and paragraphs in other languages. Is there a way (as there is in MSWord) to highlight these words and passages and choose a different language for them so that the spell checker does not see them as English misspelled words.
    Even better would be for the spell checker to identify eventual errors in these paragraphs of foreign languages: However, when I choose EDIT > SPELLING > SPELLING... the spelling checker window has no button or menu allowing the user to select different languages or language dictionaries.
    I know that Mail does it automatically for the languages provided. Is there anything comparable in Pages?
    Most of the alternative languages I use are quite common, i.e. French, Spanish, Portuguese.

    drew,
    Select your paragraph, click on the Text Inspector, More button, then select the language from the menu.
    -Dennis

Maybe you are looking for

  • How Do I Enable Closed Captions in iTunes 11?

    In iTunes 10 I had enabled Preferences>Playback>Show closed captioning when available. This check box has been removed from iTunes 11. How do I enable closed captioning in iTunes 11? Thanks in advance, Steve  = : ^ )

  • Passing field-symbols to a function module

    Hey experts. In this scenario I am in the need to pass two buffer fieldsymbols (one contains a string, the other one a table) from my main programm to a function module. The main programm handles the user input and double-loops the function call with

  • Security Actions Necessary to develop BPM processes

    Hello, could anyone tell me which security actions are necessary to develop BPM-processes. For deployment, Sap-help says the following:     *every user needs to have dc_action action to be able to read deployment related information     *if you want

  • Mail set up

    I just got an iTouch 4th generation and trying to set up my Shaw mail account. I am getting following message: "Cannot connect using SSL. Do you want to set up the account without SSL". How do I get it to work using SSL?

  • Unable to delete the running DTP request

    Hello All, Please find below the problem description: Issue: We have an Infoobject to which we are loading data. There are many attributes to this InfoObject. I pulled the data till PSA from R/3. Then I scheduled the same from PSA to the InfoObject u