Skip to content

Subsentence Class

Subsentence inherits from TextChunk.

Subsentence stores data relative to a part of a sentence. For longer and more complicated sentences it can be advantageous to cut it in multiple pieces to have a more detailed analysis.

For example:

I liked the park but it was raining and the weather was cold 

would be cut into:

I liked the park but it was raining and the weather was cold

In this case it allows to perform more precise sentiment analysis than assigning a score to the whole sentence.

Subsentence is iterable and will yield instances of Token class.

Attributes / Properties

NameTypeDescription
tokenslist of Token instancesList of Token in the subsentence
common propertiesdepends on propertyProperties allowing access to specific data (pos, token etc.)