public function getMergedPattern($quality = \Org\Heigl\Hyphenator\Hyphenator::QUALITY_HIGHEST)
    {
        $content = $this->getHyphenateContent();
        $endPattern = str_repeat('0', mb_strlen($content)+1);
        foreach ($this->pattern as $string => $pattern) {
            $strStart = -1;
            while (false !== $strStart = @mb_strpos($content, $string, $strStart + 1)) {
                $strLen   = mb_strlen($string);
                for ($i=0; $i <= $strLen; $i++) {
                    $start = $i+$strStart;
                    $currentQuality = substr($endPattern, $start, 1);
                    $patternQuality = substr($pattern, $i, 1);
                    if ($currentQuality >= $patternQuality) {
                        continue;
                    }
                    if ($quality < $patternQuality) {
                        continue;
                    }
                    $endPattern = substr($endPattern, 0, $start) . $patternQuality . substr($endPattern, $start+1);
                }
            }
        }

        return substr($endPattern, 1, strlen($endPattern)-2);
    }