Module opinion_data :: Class Cexpression
[hide private]
[frames] | no frames]

Class Cexpression

source code

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
 
__str__(self) source code
xml Element
get_node(self)
Returns the node of the element
source code
string
get_polarity(self)
Returns the polarity for the expression
source code
Cspan
get_span(self)
Returns the span of the object
source code
string
get_strength(self)
Returns the strength for the expression
source code
 
set_comment(self, c)
Sets the comment for the element
source code
 
set_polarity(self, pol)
Sets the polarity for the expression
source code
 
set_span(self, my_span)
Sets the span with the provided span object
source code
 
set_strength(self, st)
Sets the strength for the expression
source code
Method Details [hide private]

__init__(self, node=None)
(Constructor)

source code 

Constructor of the object

Parameters:
  • node (xml Element or None (to create and empty one)) - this is the node of the element. If it is None it will create a new object

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_polarity(self)

source code 

Returns the polarity for the expression

Returns: string
the polarity for the expression

get_span(self)

source code 

Returns the span of the object

Returns: Cspan
the span object

get_strength(self)

source code 

Returns the strength for the expression

Returns: string
the strength for the expression

set_comment(self, c)

source code 

Sets the comment for the element

Parameters:
  • c (string) - comment for the element

set_polarity(self, pol)

source code 

Sets the polarity for the expression

Parameters:
  • pol (string) - polarity for the expression

set_span(self, my_span)

source code 

Sets the span with the provided span object

Parameters:
  • my_span (Cspan) - span object

set_strength(self, st)

source code 

Sets the strength for the expression

Parameters:
  • st (string) - strength for the expression