protected function parseDocumentTitleParts(array $parts)
    {
        $segments = [];
        foreach ($parts as $key => $value) {
            $value = $this->parseDocumentTitlePart($value, $key, $parts);
            if ($value === true) {
                $value = $parts[$key];
            }

            if (is_bool($value) || (empty($value) && !is_numeric($value))) {
                continue;
            }

            $segments[$key] = (string)$value;
        }

        return $segments;
    }