class documentation
class Comparison(object): (source)
Constructor: Comparison(text, comp_type, entity_1, entity_2, ...)
A Comparison represents a comparative sentence and its constituents.
| Method | __init__ |
No summary |
| Method | __repr__ |
Undocumented |
| Instance Variable | comp |
Undocumented |
| Instance Variable | entity |
Undocumented |
| Instance Variable | entity |
Undocumented |
| Instance Variable | feature |
Undocumented |
| Instance Variable | keyword |
Undocumented |
| Instance Variable | text |
Undocumented |
def __init__(self, text=None, comp_type=None, entity_1=None, entity_2=None, feature=None, keyword=None):
(source)
¶
| Parameters | |
| text | a string (optionally tokenized) containing a comparation. |
| comp | an integer defining the type of comparison expressed. Values can be: 1 (Non-equal gradable), 2 (Equative), 3 (Superlative), 4 (Non-gradable). |
| entity | the first entity considered in the comparison relation. |
| entity | the second entity considered in the comparison relation. |
| feature | the feature considered in the comparison relation. |
| keyword | the word or phrase which is used for that comparative relation. |