def tuple2str(tagged_token, sep='/'):
 (word, tag) = tagged_token
 if (tag is None):
  return word
 else:
  assert (sep not in tag), 'tag may not contain sep!'
  return ('%s%s%s' % (word, sep, tag))

def tuple2str ( tagged_token , sep = '/' ) : ( word , tag ) = tagged_token if ( tag is None ) : return word else : assert ( sep not in tag ) , 'tag may not contain sep!' return ( '%s%s%s' % ( word , sep , tag ) )
given the tuple representation of a tagged token .