def get_labels_from_sample(sample):
    """
    Each label of Chinese words having at most N-1 elements, assuming that it contains N characters that may be grouped.

    Parameters
    ----------
    sample : list of N characters

    Returns
    -------
    list of N-1 float on [0,1] (0 represents no split)
    """
    labels = []
    for word in sample:
        if len(word) > 1:
            for _ in range(len(word)-1):
                labels.append(0)    # within a word, append a '0' for each interstice
            labels.append(1)   # at the end of a word, append a '1'
        else:
            labels.append(1)
            
    labels = labels[:-1]   # Throw away the last value, it doesn't represent an interstice
    
    return labels