title: One hot encoding characters
body: <p>Is there a possibilty to one-hot encode characters of a text in Tensorflow or Keras?</p>
  
  <ul>
  <li><code>tf.one_hot</code> seem to take only integers.</li>
  <li><code>tf.keras.preprocessing.text.one_hot</code> seems to one-hot encode sentences
  to words, but not to characters.</li>
  </ul>
  
  <p>Beside that, <code>tf.keras.preprocessing.text.one_hot</code> works really strange, since the response does not really seem one-hot encoded, since the following code:</p>
  
  <pre><code>text = "ab bba bbd"
  res = tf.keras.preprocessing.text.one_hot(text=text,n=3)
  print(res)
  </code></pre>
  
  <p>Lead to this result:</p>
  
  <pre><code>[1,2,2]
  </code></pre>
  
  <p>Every time I run this program, the output is a different 3d vector, sometimes it is <code>[1,1,1]</code> or <code>[2,1,1]</code>. The documentation says, that unicity is not guaranteed, but this seems really senseless to me.</p>