Well, in data preparation, you would map whatever classes you have to 0 ... number of classes-1, whether that is what you start with or you have words as classes or some otherwise numbered classes. One example of how to do this in Python is given in Jeremy Howards fast.ai classes when he does language models.