title: What does Keras Tokenizer method exactly do?
body: <p>On occasion, circumstances require us to do the following:</p>
  
  <pre><code>from keras.preprocessing.text import Tokenizer
  tokenizer = Tokenizer(num_words=my_max)
  </code></pre>
  
  <p>Then, invariably, we chant this mantra:</p>
  
  <pre><code>tokenizer.fit_on_texts(text) 
  sequences = tokenizer.texts_to_sequences(text)
  </code></pre>
  
  <p>While I (more or less) understand what the total effect is, I can't figure out what each one does separately, regardless of how much research I do (including, obviously, the documentation). I don't think I've ever seen one without the other. </p>
  
  <p>So what does each do? Are there any circumstances where you would use either one without the other? If not, why aren't they simply combined into something like:</p>
  
  <pre><code>sequences = tokenizer.fit_on_texts_to_sequences(text)
  </code></pre>
  
  <p>Apologies if I'm missing something obvious, but I'm pretty new at this.</p>