title: How does LSTM convert character embedding vectors to sentence vector for sentence classification?
body: <p>I want to build a LSTM model for sentence classification using character embeddings. </p>
  
  <p>I know how to do it using word embeddings where the model can learn the embeddings from word indexes but not sure how to do it with character embeddings.</p>
  
  <p><strong>for word embeddings:</strong></p>
  
  <pre><code>sentence_list = ['this is a dog', 'the cat and the mouse']
  label = [1,0]
  word_dict = {'this':1,
               'is':2,
               'a':3,
               'dog':4,
               'the':5,
               'cat':6,
               'and':7,
               'mouse':8}
  
  # set vector length = 9
  vectors = [[1,2,3,4,0,0,0,0,0]
                [0,0,0,0,5,6,7,5,8]]
  model.fit(vectors,label)
  </code></pre>
  
  <p>so this is ready to be fitted into a LSTM model.</p>
  
  <p>How do we do it for character based vectors?</p>
  
  <p>for example:
  if i have this character dictionary:</p>
  
  <pre><code> char_dict = {'t':1,
               'h':2,
               'i':3,
               's':4,
               'a':5,
               'd':6,
               'o':7,
               'g':8}
  </code></pre>
  
  <p>How do i format this to be readable for the LSTM classification model?
  More specifically, how do we combine multiple character vectors to be fed into the LSTM model?</p>