Back to LanguageTool Homepage - Privacy - Imprint

Node.JS Wrapper Changelog


What’s new:

Well, I said there will be functions, but as I had to rewrite languagetool.createReport, only one new function will be added, and I’m talking about…


Nothing flashy, but it’s always something…


What’s new?

Making .json mistake report file. What do you think about upcoming update? Do you have any suggestions about further features? If so, comment below!


What’s new?

  • showMistakes - function, that gives you array of all misspelled/grammarly incorrect words.

  • bestSuggestion - function, that comapres all the avalible suggestions, and picks the best one for each mistake.

How does this work internally? Does it select the suggestion most similar to the original word?

Technically, yeah… but there’s a small update:
I’ve just tested this function out… and it considers different matches, than objects in replacements (when you make a request for JSON). I’ll send screenshots in a moment…

So… here’s when I checked word Monsz. My app thinks, that Mons is the best match for Monsz, JSON API considers mąż, as the best match, what I agree with…

Sorting the matches should probably be left to the backend, i.e. LT. If LT doesn’t get it right, we should improve it. There are ideas about this, and it’s already somewhere on the to do list.

I haven’t expeirenced any completely missed replacements in your JSON API so far. There was one situation I remember, where the first replacement, wasn’t the right replacement. Still, it wasn’t a big miss though, so I don’t really have anything to complain about by now.

So, I got rid of the weird string similarity algorithm, and I like the way bestSuggestion() works now :smiley: Have a look: