Automattic / harper
Automattic / harper
Harper is an English grammar checker designed to be just right. I created it after years of dealing with the shortcomings of the competition. Harper 是一款旨在实现“恰到好处”的英语语法检查工具。我开发它是为了解决多年来在使用竞品时遇到的种种不足。
Grammarly was too expensive and too overbearing. Its suggestions lacked context, and were often just plain wrong. Not to mention: it’s a privacy nightmare. Everything you write with Grammarly is sent to their servers. Their privacy policy claims they don’t sell the data, but that doesn’t mean they don’t use it to train large language models and god knows what else. Not only that, but the round-trip-time of the network request makes revising your work all the more tedious. Grammarly 太贵且过于强势。它的建议缺乏语境,而且往往完全错误。更不用说:它简直是隐私噩梦。你用 Grammarly 写的任何内容都会被发送到他们的服务器。虽然他们的隐私政策声称不会出售数据,但这并不意味着他们不会利用这些数据来训练大语言模型,天知道他们还会拿这些数据做什么。不仅如此,网络请求的往返延迟也让修改工作变得更加繁琐。
LanguageTool is great, if you have gigabytes of RAM to spare and are willing to download the ~16GB n-gram dataset. Besides the memory requirements, I found LanguageTool too slow: it would take several seconds to lint even a moderate-size document. LanguageTool 很棒,前提是你有多余的几 GB 内存,并且愿意下载约 16GB 的 n-gram 数据集。除了内存需求外,我还发现 LanguageTool 太慢了:即使是中等篇幅的文档,它也需要几秒钟才能完成检查。
That’s why I created Harper: it is the grammar checker that fits my needs. Not only does it take milliseconds to lint a document, take less than 1/50th of LanguageTool’s memory footprint, but it is also completely private. Harper is even small enough to load via WebAssembly. 这就是我创建 Harper 的原因:它是一款符合我需求的语法检查器。它不仅能在几毫秒内完成文档检查,内存占用不到 LanguageTool 的 1/50,而且完全保护隐私。Harper 甚至小到可以通过 WebAssembly 加载。
Language Support
语言支持
Harper currently only supports English, but the core is extensible to support other languages, so we welcome contributions that allow for other language support. Harper 目前仅支持英语,但其核心架构具有可扩展性,支持添加其他语言,因此我们欢迎能够实现其他语言支持的贡献。
Performance Issues
性能问题
We consider long lint times bugs. If you encounter any significant performance issues, please create an issue on the topic. If you find a fix to any performance issue, we would appreciate the contribution. Just please make sure to read our contribution guidelines first. 我们将过长的检查时间视为 Bug。如果你遇到任何严重的性能问题,请提交相关 Issue。如果你找到了性能问题的修复方案,我们非常欢迎你的贡献。但在提交前,请务必先阅读我们的贡献指南。
Links
相关链接
- Frequently Asked Questions (常见问题解答)
- Obsidian Documentation (Obsidian 文档)
- harper-ls Documentation (harper-ls 文档)
- Supported Editors’ Documentation (支持的编辑器文档)
- Visual Studio Code
- Neovim
- Helix
- Emacs
- Zed
- harper.js Documentation (harper.js 文档)
- Official Discord Server (官方 Discord 服务器)
Huge Thanks
特别鸣谢
This project would not be possible without the hard work from those who contribute. Harper’s logo was designed by Lukas Werner. 没有贡献者们的辛勤工作,这个项目就不可能实现。Harper 的 Logo 由 Lukas Werner 设计。