This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#preparing a tokenizer for summary on training data | |
y_tokenizer = Tokenizer() | |
y_tokenizer.fit_on_texts(list(y_tr)) | |
#convert summary sequences into integer sequences | |
y_tr = y_tokenizer.texts_to_sequences(y_tr) | |
y_val = y_tokenizer.texts_to_sequences(y_val) | |
#padding zero upto maximum length | |
y_tr = pad_sequences(y_tr, maxlen=max_len_summary, padding='post') | |
y_val = pad_sequences(y_val, maxlen=max_len_summary, padding='post') | |
y_voc_size = len(y_tokenizer.word_index) +1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment