def _translate_tags_grobid_to_IOB(tag):
    """
    Convert labels as used by GROBID to the more standard IOB2 
    """
    if tag.endswith('other>'):
        # outside
        return 'O'
    elif tag.startswith('I-'):
        # begin
        return 'B-'+tag[2:]
    elif tag.startswith('<'):
        # inside
        return 'I-'+tag
    else:
        return tag