def __call__(self, tokenized_sentences):
all_input_tokens = []<EOL>all_spaces = []<EOL>for sentence in tokenized_sentences:<EOL><INDENT>words_in_sentence = sentence.words<EOL>if len(words_in_sentence) > <NUM_LIT:0>:<EOL><INDENT>all_input_tokens += sentence.words<EOL>current_sentence_pos = <NUM_LIT:0><EOL>spaces_list = [True] * len(words_in_sentence)<EOL>for i, word in enumerate(words_in_sentence[:-<NUM_LIT:1>]):<EOL><INDENT>current_sentence_pos = sentence.text.find(<EOL>word, current_sentence_pos<EOL>)<EOL>if current_sentence_pos == -<NUM_LIT:1>:<EOL><INDENT>raise AttributeError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>current_sentence_pos += len(word)<EOL>if not any(<EOL>sentence.text[current_sentence_pos:].startswith(s)<EOL>for s in whitespace<EOL>):<EOL><INDENT>spaces_list[i] = False<EOL><DEDENT><DEDENT>all_spaces += spaces_list<EOL><DEDENT><DEDENT>return Doc(self.vocab, words=all_input_tokens, spaces=all_spaces)<EOL>
Apply the custom tokenizer.

        :param tokenized_sentences: A list of sentences that was previously
        tokenized/split by spacy
        :return: Doc (a container for accessing linguistic annotations).