smatthewenglish
smatthewenglish

Reputation: 2889

POS tagger to tag only the start and end of a sentence

Is it possible to modify the stanford POS tagger so that it only tags the start and end of a sentence and nothing else?

Has this been attempted, or completed, before? Is that code available?

What file needs to be hacked to make this happen?

Is there another tool that provides this functionality relaibly, and relaitively quickly, with good formatting?

Upvotes: 0

Views: 337

Answers (1)

Andrew
Andrew

Reputation: 8048

Not sure if this is still relevant, but I do use the beginPosition() of the first Part Of Speech and the endPosition() of the last part of speech of the current sentence to exactly get the start and end of teh sentence in the input text.

Just cast the part of speech to a TaggedWord. You can then easily access these properties from the getters , tag() and value().

Check out this question for more info:

List of part of speech tags per sentence with POS Tagger Standford NPL in C#

Best, Andrew

Upvotes: 1

Related Questions