from typing import Dict
from typing import List
from typing import Tuple


def get_sentences_bounds(text_info: Dict) -> List[Tuple[int, int]]:
    """
    Create bounds for each sentence
    (start word, end word + 1)
    Parameters
    ----------
    text_info: Dict

    Returns
    -------
    out: List[Tuple[int, int]

    """
    sentences_bounds: List[Tuple[int, int]] = []
    current_word_number = 0

    for sentence in text_info['sentences_info']:
        number_of_words_in_sentence = len(sentence['semantic_roles']['words'])
        sentences_bounds.append((current_word_number,
                                 current_word_number + number_of_words_in_sentence))
        current_word_number += number_of_words_in_sentence
    return sentences_bounds