If I understand the use case correctly, you are dealing with names, which are corresponding to a category, i.e. they have a unique label.
You would like to pass these names (as labels or in any representation) into your model and would like to get the abbreviation of this name as the latent tensor?