def penntreebank2universal(token, tag):
if tag.startswith(("<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>return (token, "<STR_LIT>" % (NOUN, tag.split("<STR_LIT:->")[-<NUM_LIT:1>]))<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, NOUN)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, VERB)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, ADJ)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, ADV)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, PRON)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, DET)<EOL><DEDENT>if tag in ("<STR_LIT>",):<EOL><INDENT>return (token, PREP)<EOL><DEDENT>if tag in ("<STR_LIT>",):<EOL><INDENT>return (token, NUM)<EOL><DEDENT>if tag in ("<STR_LIT>",):<EOL><INDENT>return (token, CONJ)<EOL><DEDENT>if tag in ("<STR_LIT>",):<EOL><INDENT>return (token, INTJ)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return (token, PRT)<EOL><DEDENT>if tag in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT:.>", "<STR_LIT:!>", "<STR_LIT:?>", "<STR_LIT:U+002C>", "<STR_LIT::>", "<STR_LIT:(>", "<STR_LIT:)>", "<STR_LIT>", "<STR_LIT:#>", "<STR_LIT:$>"):<EOL><INDENT>return (token, PUNC)<EOL><DEDENT>return (token, X)<EOL>
Returns a (token, tag)-tuple with a simplified universal part-of-speech tag.