How to Skip Part of Speech (POS)?

HI
I am getting problem in skipping a part of speech (POS). The question is I want to skip very first POS and use to second one POS. Could anyone please help me out how can i make this rule?
your comments will be appreciated.
Many Thanks

The very first token of the sentence is special: it has POSTAG=“SENT_START”. It is not a token, it is only the start of the sentence. You could include that in your pattern, but MARK the later postag:
If you want the 1st word of the sentence:
<pattern><token postag="SENT_START"/><marker><token>anything</token></marker></pattern>
If you want the second one:
<pattern><token postag="SENT_START"/><token/><marker><token>anything</token></marker></pattern>

Is that what you are looking for? Check this out for a lot of tips: Tips and Tricks - LanguageTool Wiki

If this is not the answer you were looking for, please explain what the rule is you are trying to make; give the wrong sentence and the correction you would like to be made.

Hey Ruud, many thanks for the reply on my comment.
Actually I am looking for another problem such as I have a problem statement “why are you down?”
Here on above problem statement the word “down” having a several Part of Speech (POS) for instance, IN, JJ, RP, VB. Now here it is I want to skip the very first POS (IN) and wanted to use a second POS (JJ). I am stuck here how can I skip the first POS (IN)?
How can I make a rule for that problem?
Many Thanks.

Ah, you do not want to skip, but to remove the postag in in cases like this? That can be done in the disambiguator. Have a look at the wiki on ‘developing a disambiguator’. It is far from easy to do things like this; there are sometimes unexpected consequences of a disambiguator rule. You can give it a try locally.
If you want to make a change in an existing language, please contact the maintainer; this person might have good ideas for you.

1 Like

I want to skip POS such as: we|they Are, but I am not getting that how can i skip multiple POS?
For example I have NN:U|JJ|RP, now i want to skip NN:U and RP and I want to use JJ.
How can I make this type of rule?

I am sorry, but I think there is a language barrier between us. I still do not understand what you want to achieve. Which language are these postags from? Of which words are those postags?

Ruud

I have attached a screenshot regarding the problem that i am facing right now.
My actual problem is, if I have several POS taggers for the specific word “down” .
Here on above problem statement the word “down” having a several Part of Speech (POS) for instance, IN, JJ, RP, VB. Now here you can see in attached image there are several POS taggers for the specific word “down”. Now I want to skip the very first POS (IN) and wanted to use a second POS (JJ). I am stuck here how can I skip the first POS (IN) using SKIP attribute.
How can I make a rule for that problem?

You can only skip tokens, not postags. Or you can remove postags from the word using the disambiguator. Apparently, you are working on English.

But it is still not clear to me what you want to achieve. Please describe which error you are trying to catch, and give a bad and a corrected example.

1 Like

Cool, That’s really good to know. I was confused about postaggers i was thinking like we’re skipping POS.
So, If we can skip a token, so how can we skip?
Please explain this screenshot how skip attribute is working?

SKIP 1 means there can be 0 or 1 token between ‘same’ and ‘like or than’
So this rule will be hit in phrases like:
The same like
The same than
The same person than
The same person like

So it means that the pattern is allowed to skip 1 token from the token where it says ‘skip’.

But this is explained on the wiki just as well; there is a lot of useful stuff at: Development Overview - LanguageTool Wiki

1 Like