Topological Complexity in Natural and Formal Languages