Click here to Skip to main content
12,754,391 members (29,410 online)
Click here to Skip to main content


107 bookmarked
Posted 6 Jan 2001

A Spell Checking Engine

, 5 Feb 2001
A free spell checking engine for use in your C++ applications. Includes the current US English dictionary

  Copyright:		2000
  Author:			Matthew T Gullett
  Name:				CFPSSpellCheckEngine
  Part of:			Spell Checking Engine 
  Requires:			USMain.dic, [USUser.dic], [USCommon.dic]

  This class is designed to implement a phonetic spell
  checking engine with support for US English (and probably
  UK english)  It implements a simple interface for accessing
  spell checking functions.  It is designed to be very fast
  with support for a user dictionary and a common misspelling
  dictionary to improve performance and user perception.  

  This class is provided -as is-.  No warranty as to the
  function or performance of this class is provided either 
  written or implied.  
  You may freely use this code and modify it as necessary,
  as long as this header is unmodified and credit is given
  to the author in the application(s) in which it is


#if !defined(AFX_FPSSPELLCHECKENGINE_H__9CDCF81C_0F4A_11D3_9EAF_444553540000__INCLUDED_)

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "FPSSpellCheckEngineOptions.h"
class CFPSDictionary;

class CFPSSpellCheckEngine  
	virtual long GetRecordCount();
	virtual void IgnoreWord(LPCSTR lpszWord);
	virtual BOOL InitEngine (LPCSTR lpszConfigFile);

	virtual CFPSDictionary* GetMainDic() {return m_pMainDic;}
	virtual CFPSDictionary* GetUserDic() {return m_pUserDic;}
	virtual CFPSSpellCheckEngineOptions& GetOptions() {return m_Options;}

	virtual BOOL FindWord(LPCSTR lpszWord, CStringList &PossibleMatches, BOOL bSuggest);
	virtual BOOL IsIgnoredWord(LPCSTR lpszWord);
	virtual void ReloadCommonDic();
	virtual void DisplayOptions();

	virtual ~CFPSSpellCheckEngine();

	virtual BOOL InitEngine();
	virtual void CacheCommonUseWords();

	CMapStringToString m_CmnUseDic;
	CMapStringToString m_RecentFinds;

	CFPSSpellCheckEngineOptions m_Options;

	CFPSDictionary*	m_pMainDic;
	CFPSDictionary* m_pUserDic;

#endif // !defined(AFX_FPSSPELLCHECKENGINE_H__9CDCF81C_0F4A_11D3_9EAF_444553540000__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Matt Gullett
Web Developer
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 6 Feb 2001
Article Copyright 2001 by Matt Gullett
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid