File size: 737 Bytes
ee588cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import pickle
#In case of any clarification, email to - [email protected]
# The latest modifications can be found at: www.amrithkrishna.com
# Class definition for pickle files
# currently the pickle files can be opened only with Python 3
class DCS:
def __init__(self, sent_id, sentence):
self.sent_id = sent_id
self.sentence = sentence
self.dcs_chunks = []
self.lemmas = []
self.cng = []
output_load = pickle.load(open('DCS_999.p', "rb"), encoding='utf-8')
print(output_load)
print('Sentence Id:',output_load.sent_id)
print('Sentence:',output_load.sentence)
print('Chunks:',output_load.dcs_chunks)
print('Lemmas:',output_load.lemmas)
print('Morphological class (CNG):',output_load.cng)
|