Transformer Principles and Applications