void r_language_rep::hyphenate ( string s, int after, string& left, string& right) { array<int> penalty= get_hyphens (s); std_hyphenate (s, after, left, right, penalty[after]); }
void ad_hoc_language_rep::hyphenate ( string s, int after, string& left, string& right) { if (hyphens->contains (s)) { array<int> penalty= get_hyphens (s); std_hyphenate (s, after, left, right, penalty[after]); } else base->hyphenate (s, after, left, right); }
array<int> get_hyphens (string s, hashmap<string,string> patterns, hashmap<string,string> hyphenations) { return get_hyphens (s, patterns, hyphenations, false); }