Mike
Mike

Reputation: 279

Find sentences with describing context using stanford NLP

Is there any way to find those sentences that are describing objects?

For example sentences like "This is a good product" or "You are very beautiful"

I guess I can create an algorithm by using TokenSequencePattern and filter with POS some patterns like PRONUN + VERB + ADJECTIVE but don't think would be something reliable.

I am asking you if there is something out of the box, what I am trying to do is to identify review comments on a webpage.

Upvotes: 0

Views: 186

Answers (1)

DhruvPathak
DhruvPathak

Reputation: 43245

Instead of POS tagging, you would achieve better results by dependency parsing. By using that instead of POS tagging & patterns as you mentioned, you will have richer and accurate information about the sentence structure. Example:

https://demos.explosion.ai/displacy/?text=The%20product%20was%20really%20very%20good.&model=en_core_web_sm&cpu=0&cph=0

enter image description here

Stanford NLP does support depedency parsing. Apart from that you can also use the brilliant SpaCy.

Upvotes: 1

Related Questions