Text this: Research on Tibetan Spelling Formal Language and Automata with Application