Spacy: How to specify/enforce a token's POS to be treated as PROPN in Spacy POS?

Viewed 24

I'm analyzing a dataset which has a particular brand name. Instead of training POS from scratch, is there a way where we can supply the POS values of this brand name as PROPN? So that its treated as PROPN always.

1 Answers

Not exactly. You can post-process your doc to correct the POS for individual tokens to PROPN, but the POS annotation for the surrounding tokens won't be affected. The tagger doesn't support providing partial annotation as a starting point, so there's no way to influence the tagger by providing it in advance.

To correct the POS for individual tokens, you can use the attribute_ruler component or you can write your own small custom component.

Note that the parser and NER components don't use the POS tags as features, so their analysis will not change even if you modify the POS.

Related