«
class documentation

class Review(object): (source)

Constructor: Review(title, review_lines)

View In Hierarchy

A Review is the main block of a ReviewsCorpusReader.

Method __init__ No summary
Method __repr__ Undocumented
Method add_line Add a line (ReviewLine) to the review.
Method features Return a list of features in the review. Each feature is a tuple made of the specific item feature and the opinion strength about that feature.
Method sents Return all tokenized sentences in the review.
Instance Variable review_lines Undocumented
Instance Variable title Undocumented
def __init__(self, title=None, review_lines=None): (source)
Parameters
titlethe title of the review.
review_linesthe list of the ReviewLines that belong to the Review.
def __repr__(self): (source)

Undocumented

def add_line(self, review_line): (source)

Add a line (ReviewLine) to the review.

Parameters
review_linea ReviewLine instance that belongs to the Review.
def features(self): (source)

Return a list of features in the review. Each feature is a tuple made of the specific item feature and the opinion strength about that feature.

Returns
list(tuple)all features of the review as a list of tuples (feat, score).
def sents(self): (source)

Return all tokenized sentences in the review.

Returns
list(list(str))all sentences of the review as lists of tokens.
review_lines: list = (source)

Undocumented

Undocumented