'Model-specific preprocessing for features and labels:
- Creates vocabulary lookup tables for target vocab
- Converts tokens into vocabulary ids
- Prepends a speical "SEQUENCE_START" token to the target
- Appends a speical "SEQUENCE_END" token to the target'

def _preprocess(self, features, labels):

    (target_vocab_to_id, target_id_to_vocab, target_word_to_count, _) = vocab.create_vocabulary_lookup_table(self.target_vocab_info.path)
    graph_utils.add_dict_to_collection({u'target_vocab_to_id': target_vocab_to_id, u'target_id_to_vocab': target_id_to_vocab, u'target_word_to_count': target_word_to_count}, u'vocab_tables')
    if (labels is None):
        return (features, None)
    labels = labels.copy()
    if (self.params[u'target.max_seq_len'] is not None):
        labels[u'target_tokens'] = labels[u'target_tokens'][:, :self.params[u'target.max_seq_len']]
        labels[u'target_len'] = tf.minimum(labels[u'target_len'], self.params[u'target.max_seq_len'])
    labels[u'target_ids'] = target_vocab_to_id.lookup(labels[u'target_tokens'])
    labels[u'target_len'] = tf.to_int32(labels[u'target_len'])
    tf.summary.histogram(u'target_len', tf.to_float(labels[u'target_len']))
    graph_utils.add_dict_to_collection(features, u'features')
    if labels:
        graph_utils.add_dict_to_collection(labels, u'labels')
    return (features, labels)
