public function process(TextDocument $doc)
 {
     $title = $this->clear($doc->getTitle());
     $potentialTitles = $this->getPotentialTitles($title);
     if (!$potentialTitles) {
         return false;
     }
     $change = false;
     foreach ($doc->getTextBlocks() as $tb) {
         $text = $this->clear($tb->getText());
         if (isset($potentialTitles[$text])) {
             $tb->addLabel(TextLabels::TITLE);
             $change = true;
             break;
         }
         $text = trim(preg_replace('/[\\?\\!\\.\\-\\:]+/', '', $text));
         if (isset($potentialTitles[$text])) {
             $tb->addLabel(TextLabels::TITLE);
             $change = true;
             break;
         }
     }
     return $change;
 }