def reverse_bert_tokenize(segs):
    """
        Reverse subwords to original word.
        Adapt to bert, robera and albert.
    Args:
        segs: list of subwords

    Returns:
        a single word
    """

    text = ' '.join([x for x in segs])
    # skip bert concatenate chars
    text = text.replace(' ##', '')
    # skip albert concatenate chars
    if len(text) > 1 and text[0] == '_':
        text = text[1:]

    return text