python code for language analysis