You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
512 B
18 lines
512 B
from feature_extraction.features import extract_features_from_text
|
|
|
|
|
|
class DataInstance:
|
|
"""
|
|
Model Class for carrying Training and Testing data from tsc/csv file
|
|
"""
|
|
|
|
def __init__(self, r_id, text, true_label):
|
|
self.did = r_id
|
|
self.text = text
|
|
self.true_label = true_label
|
|
self.features = extract_features_from_text(text)
|
|
|
|
def print(self):
|
|
print('\nTrue Label :: ', self.true_label, ' Text :: ', self.text)
|
|
print('Features :: ', self.features)
|