shivrajanand's picture
Upload folder using huggingface_hub
ee588cd verified
raw
history blame contribute delete
737 Bytes
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)