Modular text transformer