Added method to directly create a extensions dictionary for text