def extract_indices_from_dependencies(dependencies):
    """ Extract all tokens from dependencies
        Input example:
        [[8, 'cop', 7], [8, 'nsubj', 6]]
        Output example:
        [6, 7, 8]
    """
    word_positions = set()
    for governor_pos, _, dependent_pos in dependencies:
        word_positions.add(governor_pos)
        word_positions.add(dependent_pos)

    return list(sorted(word_positions))