import six


def is_start_piece(piece):
    """Check if the current word piece is the starting piece (sentence piece)."""
    # special_pieces = set(list('!"#$%&\"()*+,-./:;?@[\\]^_`{|}~'))
    # special_pieces.add(u"€".encode("utf-8"))
    # special_pieces.add(u"£".encode("utf-8"))
    # # Note(mingdachen):
    # # For foreign characters, we always treat them as a whole piece.
    # english_chars = set(list("abcdefghijklmnopqrstuvwxyz"))
    # if (six.ensure_str(piece).startswith("▁") or
    #         six.ensure_str(piece).startswith("<") or piece in special_pieces or piece in ["[CLS]", "[SEP]", "[MASK]"] or
    #         not all([i.lower() in english_chars.union(special_pieces)
    #                  for i in piece])):
    #     return True
    # else:
    #     return False
    if six.ensure_str(piece).startswith("▁") or piece == "[MASK]":
        return True
    else:
        return False