import re


def process_sentencepiece_token_for_alignment(t):
    """Add word boundary markers, removes token prefix (space meta-symbol)."""
    if t.startswith("▁"):
        return "<w>" + re.sub(r"^▁", "", t)
    else:
        return t