title: How do I use "text_dataset_from_directory" to do binary text classification from tf.dataset object?
body: <p>Sorry, I am still relatively new to text classification and Tensorflow, so this may look like a very dumb question.</p>
  <p>I have the song lyrics of two different singers. What I am trying to achieve is to build a binary text classification model to predict whether a song fits to the style of singer A or singer B more.
  I have the training data (the lyrics text files) of both classes in sub-directories. The directory structure is similar to,</p>
  <pre><code>Classification/
  ...Singer_A/
  ......A_song_1.txt
  ......A_song_2.txt
  ...Singer_B/
  ......B_song_1.txt
  ......B_song_2.txt
  </code></pre>
  <p>And from what I read on the Tensorflow documentation, I could easily construct a dataset by using the
  <code>text_dataset_from_directory</code> method. So something like,</p>
  <pre><code>dataset = text_dataset_from_directory(
      'Classification', labels='inferred', label_mode='int',
      batch_size=32
  )
  </code></pre>
  <p>However, I don't know how I could go on from there. I would suppose that the created <code>tf.data.Dataset</code> object would still need Tokenization in the texts component, and the tokenized text would then need padding and embedding before feeding it into a logistic model. But I don't know how to further process it in the <code>tf.data.Dataset</code> object.</p>
  <p>I saw <a href="https://www.tensorflow.org/text/guide/word_embeddings" rel="nofollow noreferrer">Tensorflow's Text Embedding Tutorial</a>, but don't really see how it could be changed to become a binary model.</p>