Back to LanguageTool Homepage - Privacy - Imprint

IGNORE HTML TAGS in checking text w/ HTML


(viktor) #1

i saw thread from this forum. but it didn't explain everything. how can we ignore html tags in checking for misspelled words. the languagetool always saw it as misspelled words. please help


(Daniel Naber) #2

i saw thread from this forum. but it didn't explain everything. how
can we ignore html tags in checking for misspelled words. the
languagetool always saw it as misspelled words. please help

If you're using the command line version, you could try the --xmlfilter
option. It's a hack though and it's not guaranteed that the error
positions are okay.

Regards
Daniel


(viktor) #3

good day sir, i was just using the languagetool-core, language-en library and its dependencies for our web app. is it the same as using command line?? thanks ahead sir.


(Daniel Naber) #4

library and its dependencies for our web app. is it the same as using
command line?? thanks ahead sir.

From Java, you can use StringTools.filterXML() to simply remove the
HTML/XML (that's a very simple approach, it might sometimes fail) and
then check the text. The positions (line/column) of the errors will then
be messed up though.

Regards
Daniel