def post_process_botok_segmented_data(segmented_text):
    """Remove unwanted space from segmented text

    Args:
        segmented_text (str): Botok segmented text

    Returns:
        str: clean segmented text
    """
    clean_segmented_text = segmented_text.replace('\n ', '\n')
    clean_segmented_text = clean_segmented_text.replace('  ', ' ')
    return clean_segmented_text