Hacker News new | past | comments | ask | show | jobs | submit login
Language Tool – Open-source Grammarly alternative (languagetool.org)
370 points by Brajeshwar on July 26, 2022 | hide | past | favorite | 75 comments



I'm fond of Vale, where you can write your own rules or grab others off github. I wish we could crowd source a grammarly clone using it. Some efforts have been made to do so, but didn't get far.

https://github.com/errata-ai/vale

https://github.com/testthedocs/Openly


LT does have the functionality to add your own tools, and is open source and self-hostable


LanguageTool is based on a pretty powerful open-source tool, that's running in the cloud but can also be run on-prem. So, no need to reinvent the wheel.


This is super cool. How does one find rules from GitHub?


It seems like the org has a collection of rules, but I just now searched by the topic and got a bunch - https://github.com/topics/vale


I'm a heavy user of LT. Very happy with it.

A really nice feature of LT is that you can add your own rules. A rule editor is provided here:

https://community.languagetool.org/ruleEditor2/

Basically, whenever you catch an error in your writing you add a rule to ensure that it is caught the next time. After a few years your rule set will catch a large portion of your writing errors. It's fun too.


Can you provide examples of rules you have written?


Sure, here are two, but I have hundreds. The second one triggers quite often for me.

The art is trying to writing a rule without too much false positives. False positives are myriad. Probably 60% of warnings are false positives, so you don't want to add too much more to that. On a typical document, I can get ten pages of errors, fortunately, going through it goes quite fast.

<rule id="" name=""> <pattern> <token>comprise</token> <token>be</token> </pattern> <message>comprise be</message> <example correction=''>The thingy may <marker>comprise be</marker> configured to do things.</example> <example >The thingy may be configured to do things.</example> </rule>

<rule id="" name=""> <pattern> <token regexp='yes'>arranged|configured</token> <token>to</token> <token postag='VBG'></token> </pattern> <message>You followed <suggestion>arranged to</suggestion> or <suggestion>configured to </suggestion> with a gerund.</message> <example correction=''>The thing is <marker>arranged to replacing</marker> the other thing.</example> <example>The thing is arranged to replace the other thing.</example> </rule>


I have been a user of the Language Tool API as we're building (experimenting with?) a language learning app [1] and grammar correction is a key component. I really want to love it, and I'm so appreciative of the open source version that has allowed us to get going, but it's just so... limited. I haven't really dug into the code, but I gather that it is very rules based and that seems destined to fail because so much of language is context sensitive.

For example, it really can't determine in German if you're using the correct case or not for a particular verb. Or it can't really tell if you're using the right prepositions.

Ultimately, we ended up building a grammar engine just for language learners using transformers [2] + a version of errant [3] we ported to be multilingual. It's not perfect, but after a couple weeks of development was more helpful than LT.

1. https://squidgies.app

2. e.g. this paper from Grammarly https://arxiv.org/abs/2005.12592, but there are a bazillion others

3. https://github.com/chrisjbryant/errant


Making too good open-source solution would ruin the business model of these guys. I bet that most of the meaningful features are not included there. (I haven't looked into the code, just pricing).


>after a couple weeks of development was more helpful than LT

Wow! If your results generalize to all cases why shouldn’t they scrap everything they have and start over?


Apologies - this wasn't clear. I didn't mean to say we generalize to all cases. I should have said it was more helpful for some of the common cases that plague language learners.


The Jetbrains Grazie plugin [1] for IntelliJ IDEA uses Language Tool under the hood. I've been mostly using it for checking my blog posts, but it can also inspect code comments and commit messages.

[1] https://plugins.jetbrains.com/plugin/12175-grazie


The premium version has a semi-hidden AI suggestion feature. If you double click a word it will select the whole sentence and suggest rewrites that are more formal or shorter. I've found the AI feature great for inspiration.


I use both Grammarly and LT. I wish LT had an option to select the desired tone like Grammarly does. The formal one is occasionally useful but is waaay too formal for regular work-related communications (at least in the US).


We, at textcortex also added this AI paraphrasing feature for free. You can add it to your browser as chrome plugin


I haven't seen any announcement of this feature from LT, but it looks cool! Thanks for sharing.


I've been using LanguageTool for a long time, and I'm also happily paying their premium subscription. 100% worth it and highly recommended. It's also excellent at non-English languages.


Is it better than Grammarly?

I mean, sending all data to a Grammarly service brings the same privacy issues as sending it to Language Tool.


There is a big difference in terms of privacy: LanguageTool is open source and you can run it on your own computer. You can install it as browwer plugin, a LibreOffice plugin, or a standalone server that you can access from Emacs for example (the latter is no longer promoted on their website, but you can download JAR files from https://languagetool.org/download/).


Yes, but from what I got, only the basic features are open source and self-hostable. The premium features that bring it on-par to Grammarly aren't part of that.


Same here, very very smart. It even gets typographic quotes right when nesting them (such as „The sign said ‚yes‘, clearly.“), keeps an eye on not jumping between tenses or different forms of addressing people („Du“ vs. „Sie“ in German).


It looks like it provides out of the box support for Overleaf! (Collaborative LaTeX editor) https://www.overleaf.com/blog/635-languagetool-a-free-browse...

This is not true of Grammarly last I checked, you have to hack something together... (e.g. https://medium.com/@tardijkhof/how-i-made-grammarly-seamless... )


If you use VSCode as a text editor, you can use it locally on LaTeX files using LTeX extension (https://marketplace.visualstudio.com/items?itemName=valentjn...)


and if you're into Markdown, i can also recommend prosemd

https://github.com/kitten/prosemd-lsp


This is correct, there's first-class Overleaf support. https://languagetool.org/overleaf


No Android or Linux app. Subscription is high (like others have said). Appears no offline version (might be wrong) and the text is stored on their servers be default unless you manually delete it.

I'll not be using it but good effort though.


No subscription is required for the base version no account, either. Of course, the base version doesn't have all the features as premium, but it is still excellent, in my opinion. I have used the free version for years. There is an offline version, as it is open source.

The full text isn't stored on the servers, but you can always just deploy it yourself for maximum privacy:

https://dev.languagetool.org/http-server

Furthermore, there are options for docker: https://github.com/languagetool-org/languagetool#docker


Does it work on Linux? Debain?


There is no reason you can't deploy the Java server nor run the docker container on Linux. Or do you mean a native client for Linux?

For my Ubuntu machine as a client, I just use the web extension for Firefox and I also use the Visual Studio Code extension. I am most happy that my READMEs don't have such stupid errors anymore when I push them publicly where anyone can see. LOL


I run the Java server fine on my Lunix box and clients on Linux & ChromeOS use the browser LibreOffice plugins to connect to it over HTTP. Works great.


yeah, i have it via yunohost, which is debian-based


Is the text sent to the servers? That’s effectively the same thing.


> Appears no offline version

Sorta, you can always run the server locally on your own machine. It's a bit wasteful, but not terribly so.

> No Android or Linux app

I mean you can just use the plugins for browsers, email, and document writing. It won't work in the terminal (would it on MacOS regardless?) but I wouldn't consider that a downside. I'll be waiting for the Emacs package myself, but I doubt I'll have to hold my breath.


There’s already Emacs package, but it works only with offline version.

https://github.com/mhayashi1120/Emacs-langtool

Now that I checked, looks like there’s another package, but I didn’t t try it.

https://github.com/emacs-languagetool


There is surely a version for Linux. I have been using it in my computer with Archlinux [1] for a couple of years with vim (there are at least two plugins [2,3]). It works pretty good. The only thing is that when running it locally it kind of uses a lot of resources. So not so good when you are with your laptop running on battery.

[1] https://archlinux.org/packages/community/any/languagetool/ [2] https://github.com/dpelle/vim-LanguageTool [3] https://github.com/rhysd/vim-grammarous


Is there an alternative that provides an offline version?


Microsoft has a free option (Microsoft Editor: Spelling & Grammar Checker) [0], which as at par with Grammarly, and now Language Tool is almost as expensive as Grammarly!

[0]: https://chrome.google.com/webstore/detail/microsoft-editor-s...


I could see this being an option for Enterprises with concerns around intellectual property or sensitive data leakage.


Yeah, especially since enterprises often want to add their own writing rules (style guide)


Commenting just for informational purposes, but Grammarly also allows for this.

This isn't an endorsement. Just saying this isn't something that sets LT apart.


Do you mean self-hosting or style guide?


If you're a Vim user, install the vim-grammarous[0] plugin to get LanguageTool powered grammar checking at the speed of thought.

[0] https://github.com/rhysd/vim-grammarous


double the speed, if you would like support the api :>


> "Who that is." > No problems found.

Hmm.. maybe early days for English. If it's purely rule based, it probably be enough to catch issues like this broken fragment.


Well, if you're writing in fragments only…

It finds four (valid) issues in the rest of your comment, though. So, maybe you should give it a shot for a few days. See what it can really offer you.


I've been using the paid LT for several months now and love it, it's been very helpful.


This really caught my interest. I set up the docker on my Unraid instance and as far as I can tell you can't set the iOS app or chrome add on to use the local instance. Kind of a shame... I wanted something to get up and running quickly.. might setup a Streamdeck to push my clipboard to the api, but can't see a way for my phone / tablet to use it easily, or my wife.


Maybe slight tangent — are there popular free/cheap tools for auto-suggesting text like GitHub Copilot does for code?

CoPilot : Code :: ?? : Language

I know google docs does this to some extent but I don’t always use gdocs. I may be writing an email or writing an article for example in some editor.


Is there something like that but without Java?


check out nlprule, it supports LanguageTool rules and is written in Rust

https://github.com/bminixhofer/nlprule


Looks amazing, thanks.


Maybe use the docker container to avoid any Java setup stuff? This is what I usually do.

https://github.com/languagetool-org/languagetool#docker


the api, checkout pylanguagetool from pypi


So this is open-source, but if I want all the features (say, in the Mac app) I would need to pay for Premium? What if I run this on my own server — would I then have access to all features?


I prefer the Australian startup called OutWrite. They work remarkably well, in contrast to Grammarly. Language Tools was a pain when I tried setting it up (their payment processor was causing issues with the two factor authentication) and their support was lame. Makes no sense to get teary eyed about "open-source". Hosting such tools isn't an option for most users to whom this is marketed.


Mhm… the subscription is rather high for individual use. How does it stack up to Microsoft Editor?


This is great. Great to see the EU funding FLOSS projects such as this one.


if you want something like LanguageTool but for your website, check out Typosaur, it's currently in Beta!

https://typosaur.com


Has anyone tried using this or similar tools in conjunction with voice to text software?


full of false positives - nothing special here, my 2c


Would you say it's better or worse than Grammarly? Are you talking about the free version or the premium version?


I'm a premium user and it's not even close to what grammarly provides but its features are good enough to use it.


Hm, are you sure? Do you have an example?


Oof, that is a high monthly subscription cost


For me it says SEK 58.25 ($5.64) which seems more than reasonable.


I get €15.92 / month for monthly payments, €10.40 / month for quarterly and €3.99 / month for yearly. Are you looking at the yearly payments maybe?


It's hard to test it since the majority of features are behind a paywall.


Honestly i've been using it free for over a year now and I'm very happy with it. I think the free tier is worth the shot.


Free tier is great, especially if you invest in writing your own rules.


Even when you selfhost your instance, It is worse than the free-tier unless you keep ngrams database updated routinely.


Unlike other products, self hosting only gives you the same as their basic version. So even keeping it up to date will never match their premium offering. This is of course fine, just making people aware before they spend time setting it up because they don't make this very clear (I had to find a Github issue to get this conformation in writing)

The free self-hosted version you can download from https://languagetool.org/download/ lacks all the premium rules (several thousand rules for English, German, French, Spanish and Dutch) and AI-based rules.[1]

[1]: https://github.com/languagetool-org/languagetool/issues/6750


https://quillbot.com/grammar-check is an alternative for English. Not open source, but very little of the grammar checker is paywalled if the other options seem expensive.

(Disclaimer I’m a founder)


On my end Language Tool appears as 2/3th the price of your tool if I select a yearly subscription.


That’s true, but the free tier covers almost everything in our grammar checker, most of the premium features are on the paraphraser




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: