public function phrasizeOrTermize($value, $phrase = true, $escape = true)
    {
        if (!$phrase && !$escape)
            return $value;

        if (!is_array($value))
            return $phrase
                ? new PhraseExpression($value)
                : new TermExpression($value)
            ;

        $ary = array();
        foreach ($value as $key => $v) {
            $ary[$key] = $this->phrasizeOrTermize($v, $phrase, $escape);
        }

        return $ary;
    }