I’m facing a similar issue as describe by @Amir here.
But this one seems to me more vim oriented and not general. So…
Here is my question, I got a lot of domains specific terms in my text. As there are so much of them it’s becoming impossible for me to do the proof-reading with LanguageTool.
I’m a vim-languagetool user. In vim, one can use zg to add current “incorrect” word to a kind of ignore file in ~/.vim/spell/en.utf-8-add, in my case.
I see in LanguageTool-4.x/org/languagetool/resource/en/hunspell/spelling.txt we can add kind of “to ignore” things. My current solution is to use :read ~/.vim/spell/en.utf-8-add to append these “to ignore” terms to spelling.txt. As you can see, this is not the trivial solution.
Does someone have an idea of how to communicate these two file? Or can LanguageTool take an extra file for spell checking?
For each term, write a disambiguation rule to ignore spelling (<disambig action="ignore_spelling">). For examples, look in the English disambiguation.xml file.
Hi, @Mike_Unwalla Thank you for your fast reply!
It’s cool to have this user defined rule accepted. I didn’t know that.
But if I understand correctly. I still have to convert my plain “to ignore” text file (as the spelling.txt or ignore.txt) to a .xml ?
In that case, a simple append would not do the job. I have to put a trigger on my vim ignore.txt, once modification detected. Generate a new ignore.xml for Language Tool…
Can’t Language Tool accept an extra plain text ignore.txt? So that I can directly point it to my native vim ignore file.
If you want to open a pull request, you’ll need to find the place where spelling.txt is used and extend it to accept another file (which is maybe empty by default).
I’ve been thinking, in LO/OO LT supports modified user-dictionaries (including, but not limited to standard.dict) on the fly. Can’t this be used as a basis?
Hi, that sounds not bad.
But I’m relatively new to LT, is this user-dictionaries a plain text file or a .xml ?
I’d like it to be a plain text file, since that’s what is generated by vim
Some hints about how to use it ? Maybe a tutorial ? I haven’t found anything about user-dictionaries, yet…
Actually, I have a concern about this. If I get it right, this file has to be suffixed with .dic, right ? But that is not OK for vim. vim requires the no-check file ends with .add
The ideal solution for me is:
LT accept an external ignore.(whatever). And I can point it directly to the ~/.vim/spell/en.utf-8.add
I’m looking at this part, according to @dnaber, shall I add a loop for the external ignore.txt ?
the idea was to replicate how LT interacts with the content of LO/OO user-dictionaries, so the file-extension shouldn’t matter. (the .dic/.dict thing was just a minor side-note)
unfortunately, I don’t know how this interaction takes place, only that it does.
I did a quick test with my file path hard coded as SPELLING_VIM_IGNORE_FILE.
It didn’t work, the words ignored by vim are always detected as spelling mistake in LT.
Here is the added code
I don’t see how LibreOffice is relevant here. It comes with its own spell checker. LT spell checking is turned off in LO, just the non-spelling rules are active. Thus I don’t see why LT even needs to ignore words in LO.