You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
435 B
Python

class SyntacticUnit(object):
def __init__(self, text, token=None, tag=None):
self.text = text
self.token = token
self.tag = tag[:2] if tag else None # just first two letters of tag
self.index = -1
self.score = -1
def __str__(self):
return "Original unit: '" + self.text + "' *-*-*-* " + "Processed unit: '" + self.token + "'"
def __repr__(self):
return str(self)