Commit 0ad4418a authored by ilor's avatar ilor

disable boost regex srx segmenter

parent 0734f3da
......@@ -54,7 +54,9 @@ std::vector<int> Segmenter::get_break_positions() const {
Segmenter* Segmenter::get_segmenter_by_name(const std::string &name)
{
if (name == "icu") return new NaiveIcuSegmenter;
#ifdef HAVE_BOOST_REGEX
if (name == "boost") return new NaiveBoostSegmenter;
#endif
if (name == "icu-hxo") return new HxoIcuSegmenter;
return NULL;
}
......@@ -243,7 +245,7 @@ void HxoIcuSegmenter::compute_breaks(const UnicodeString &str, int from,
}
#ifdef HAVE_BOOST_REGEX
NaiveBoostSegmenter::NaiveBoostSegmenter()
{
}
......@@ -296,7 +298,7 @@ void NaiveBoostSegmenter::compute_breaks(const UnicodeString& str,
//}
//std::cerr << "\n";
}
#endif
} /* end ns Srx */
} /* end ns Toki */
......@@ -156,6 +156,7 @@ private:
std::vector<RegexMatcher*> nobreak_back_;
};
#ifdef HAVE_BOOST_REGEX
/**
* A segmenter using Boost regular expressions and the same approach
* as the ICU counterpart, @see NaiveIcuSegmenter.
......@@ -177,6 +178,7 @@ private:
/// The compiled rules
std::vector< std::pair<boost::u32regex, bool> > crules_;
};
#endif
} /* end ns Srx */ } /* end ns Toki */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment