Back to LanguageTool Homepage - Privacy - Imprint

Space as a token


(Aafreen) #1

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


(Daniel Naber) #2

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


(Aafreen) #3

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…


(Daniel Naber) #4

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


(Aafreen) #5

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


(Daniel Naber) #6

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


(Aafreen) #7

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