nlp - How to deal with length variations for text classification using CNN (Keras) -
it has been proved cnn (convolutional neural network) quite useful text/document classification. wonder how deal length differences lengths of articles different in cases. there examples in keras? thanks!!
here 3 options:
- crop longer articles.
- pad shorter articles.
- use recurrent neural network, naturally supports variable-length inputs.