import re


def segment_words(volpiano: str) -> list:
    """Segment a volpiano string in segments corresponding to words.
    Any group of 3 or more dashes is a word boundary.

    >>> segment_words('f--g---h-g')
    ['fg', 'hg']
    >>> segment_words('---f-------g---')
    ['f', 'g']

    Parameters
    ----------
    volpiano : str
        the volpiano string to segment

    Returns
    -------
    list
        A list of word-segments
    """
    # Replace >3 dashes with word boundary
    volpiano = re.sub('-{4,}', '---', volpiano)
    # Word boundary --> space and remove neume/syll boundaries
    volpiano = re.sub('---', ' ', volpiano).replace('-', '').strip()
    words = volpiano.split()
    return words