I have an ebook in HTML that is about 10000 lines long. I am looking to find and fix the misspelled words, words that don't have spaces etc.

Is there anything out there that can take an input file and a dictionary file and find all the unrecognized words?

Dani AI

Generated

For a single large HTML ebook the most reliable route is: strip out markup and run automated checks against a controlled dictionary, then review the flagged items manually. That keeps code, attributes and example snippets from polluting results and avoids dangerous global edits that change your HTML structure (a point rightly warned about).

Suggested workflow:

  1. Extract visible text only (skip script, style, pre, code and attribute values) using an HTML-aware extractor such as Beautiful Soup. See the Beautiful Soup docs.
  2. Run a spell/grammar checker that accepts plain text and a custom wordlist so proper nouns and technical terms aren’t false positives. LanguageTool and Hunspell both support batch runs and custom dictionaries (LanguageTool, Hunspell on GitHub).
  3. Add heuristic scans to catch likely “no-space” joins and odd tokens before manual review.

Useful quick heuristics (apply to the extracted text):

  • Flag very long alphabetic tokens, e.g. \b[A-Za-z]{25,}\b — often concatenations from missing spaces.
  • Flag camelCase joins with a simple pattern like ([a-z])([A-Z]).
  • Run a lightweight typo tool for common mistakes (e.g., codespell) to catch frequent misspellings.

Keep a project-specific ignore list and a backup before automated replacements. Automate changes only when replacements are high-confidence; otherwise produce a change list and patch the raw HTML with a script that targets the original text nodes, not the whole file, to preserve formatting. Finally, as suggested, include an automated spell-check step in the pipeline — it’s fast and catches the bulk of issues, but always finish with a manual pass for context-sensitive fixes.

Recommended Answers

All 2 Replies

aspell (http://aspell.net/) can be used for spell checking but I have never used it

I use Microsoft Word to check the spellings of my web pages before I upload them. But don't let Word do the changes, or it will rewrite the page code. Also open the file in notepad, or wordpad, and make the changes there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.