用于拼写检查 html 文件(.NET)的 .NET 控件?
我想使用 C# 以编程方式对 html 文件进行拼写检查?仅文本,不带标签。
有什么建议吗?请提及那些去掉标签的内容。
I would like to spell check html files programmatically using C#? The text only without the tags.
Any recommendations? Please mention ones that strip out the tags.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要从 HTML 中提取文本,请使用 HTML Agility pack。 Codeplex 上也有一些用于 HTML 拼写检查的开源工作:请参阅 Spello 项目。
To extract the text from HTML use the HTML Agility pack. There has also been some open source work for HTML spell checking on Codeplex: see the Spello project.
我建议您先删除所有标签,然后对结果文本进行拼写检查。这就是基于网络的所见即所得 html 编辑器所做的事情。
去除 html 标签:http://en.csharp-online.net/Strip_all_HTML_tags
I suggest you you strip all tags first then spell check the resulting text. That's what is done inweb based wysiwyg html editors.
To strip html tags:http://en.csharp-online.net/Strip_all_HTML_tags