Examples of classification / regression using API


(Alex Graveley) #1

It would be very useful to include some examples using the OpenNMT API for sequence classification and regression tasks. I think it could help adoption considerably to be able to easily use OpenNMT for these simpler tasks.

As toy examples maybe a sequence length counter and yelp review star rating classifier?


(srush) #2

If you want to do classification, you could in theory just make the target language a single output token (stars 1-5). If you or someone else wants to collect the data (https://keras.io/datasets/#imdb-movie-reviews-sentiment-classification) then we can add it. Regression is slightly harder, you would need to change our data format.

If I am being honest using OpenNMT for these tasks is overkill. VW/fasttext/ or even our sent-conv-torch are way faster to train.