如何在程序里实现拼写检查功能?组件?在线等待!!

guanjinke 2003-10-09 03:46:09
如何在程序里实现拼写检查功能?组件?在线等待!!
...全文
97 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Skt32 2003-10-09
  • 打赏
  • 举报
回复
http://www.codeproject.com/useritems/txtspell.asp
Skt32 2003-10-09
  • 打赏
  • 举报
回复
A Spell Check IE Menu Extension
By Shaun Wilde

An IE Menu Extension that allows you to Spell Check your form submissions

Introduction
One of the many things that I have found lacking when using Web Based Forums, such as CodeProject, is the lack of spell checking facilities within IE. So that I can post messages on forums that do not contain spelling mistakes I created this little tool that allows you to check the spelling of certain words using the Google Spelling API.

Installation
Extract the signed TxtSpell.dll from the ZIP file and install using regsvr32. Visit and register with the Google Spelling API site to get a Key to use with the DLL. This key will be stored in the registry under HKEY_CURRENT_USER\Software\Many Monkeys Limited\SpellChecker\Google. The object will ask you for the Key when it requires it, so keep it to hand.

Usage
Once installed the Spell Checker is easy to use. Select a word or words (up to 10) in the form that you wish to check the spelling of and select the Spell Check option from the context menu.


If Google decides that the words are incorrect then a new set of words will be returned and will be used to replace the currently selected text.


If there is an error that maybe attributed to an incorrect or missing Key (not 100%). Then the following install screen will popup. This install window can be used to install a new Key and check if it works.


References
Menu Extensions
Google Spelling API

Limitations

Sometimes the install screen appears when the error is not due to an incorrect key but a problem with the Google service. However these are very rare.
The number of words that can be checked in one go is 10. This limit is imposed by the Google web service.
If all the words are correct or appear to be then Google returns no answer and this is currently interpreted to be an error.

Future work
It is intended to use a different spell checking mechanism that will allow the user to select from a collection of words when a mis-spelt word is found. It is also intended to provide source code once I have integrated another spell checking mechanism such that there would be more than a few lines of non-wizard code.

I hope you find this tool useful. Please feel free to comment and offer suggestions.


About Shaun Wilde

Been involved in programming from the early '80s. First on my Spectrum, then an Amstrad. Did lots of Fortran while at University before becoming involved in Forth, Prolog, Pascal, Occam, C and eventually C++. Eventually started programming on the Windows platform using Borland’s OWL framework, during my postgraduate years. When I started work in '94, I learnt MFC followed by COM and ATL and never looked back. Now working exclusively in .NET, working on WinForms, ASP.NET and the Compact Framework using C# and VB.NET. Using every bit of the .NET framework I can such as WebServices and writing my own controls for my .NET Portal, and for the Compact Framework. Still lots I don't know, but the end of the universe hasn't happened yet - I wonder if I'll have time?

I was a permanent employee for a number of companies until Dec 2000 before going independent after the DotCom I ws involved with went DotBomb.

Now supplying consulting services to various institutions in London and the SE and I don't get much time to program for myself or to work on my website (www.many-monkeys.com).

Spend most of my spare time with the wife+kids or working on my Marine Fish tank. Who needs a screen saver to stare at when you can have the real thing!


Click here to view Shaun Wilde's online profile.

guanjinke 2003-10-09
  • 打赏
  • 举报
回复
我得邮箱guanjinke@163.com,万分感谢!!
JetGeng 2003-10-09
  • 打赏
  • 举报
回复
你可以使用正则表达式组件,他对文本的检查能力是超乎寻常的强大,你可以使用boost库中的正则表达库,一可以使用微软的。我用的是前辈封装好的一个组件,用的是boost库,如果需要可以发给你,具体那个网站下的我忘了
kink 2003-10-09
  • 打赏
  • 举报
回复
怎么个检查法?按要求写个过程不就行了?

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧