Module term_sentiment_data :: Class Cterm_sentiment
[hide private]
[frames] | no frames]

Class Cterm_sentiment

source code

This class encapsulates the sentiment element

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
 
__str__(self) source code
string
get_modifier(self)
Returns the modifier of the element
source code
xml Element
get_node(self)
Returns the node of the element
source code
string
get_polarity(self)
Returns the polarity of the element
source code
 
set_modifier(self, sm)
Sets the sentiment modifier for the sentiment element
source code
 
set_polarity(self, p)
Sets the resource for the polarity element
source code
 
set_resource(self, r)
Sets the resource for the sentiment element
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_modifier(self)

source code 

Returns the modifier of the element

Returns: string
the modifier of the element

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 of the element

Returns: string
the polarity of the element

set_modifier(self, sm)

source code 

Sets the sentiment modifier for the sentiment element

Parameters:
  • sm (string) - the modifier for the element

set_polarity(self, p)

source code 

Sets the resource for the polarity element

Parameters:
  • p (string) - the polarity for the element

set_resource(self, r)

source code 

Sets the resource for the sentiment element

Parameters:
  • r (string) - the resource for the element