Back to LanguageTool Homepage - Privacy - Imprint

Space as a token

Dear LT team,
Is there any way to capture space as a token???
E.g.,
language tool
token 1: language
token 2 regexp=‘yes’: \s
token 3: tool

Have you checked whether <regexp> helps? http://wiki.languagetool.org/development-overview#toc8

Yes… But I am trying for POS tagging too.
Same example with pos tagging:
E.g., language tool
token 1: postag='NN’
token 2 regexp=‘yes’: \s
token 3: postag='NN’
Please let me know the solution…

You could try <token spacebefore="yes" postag="NN"></token>

1 Like

Thank you for your answer. Is there any way to highlight both space and NN
e.g.,
language tool



langauge**( tool)** —> to highlight space and tool
Thanks in advance

You can use <marker>...</marker> around the tokens you want to be highlighted.

It highlights the word only, not the space before the word…