Lines Matching defs:fragment
221 * Looks for capitalized abbreviations & includes them with the following fragment.
240 foreach ($fragments as $fragment) {
241 $is_abbreviation = self::isAbreviation($fragment);
243 // merge previous fragment with this
245 $fragment = $previous_fragment . $fragment;
247 $return_fragment[$i] = $fragment;
250 $previous_fragment = $fragment;
262 * Check if the last word of fragment starts with a Capital, ends in "." & has less than 3 characters.
264 * @param $fragment
268 private static function isAbreviation($fragment)
270 $words = mb_split('\s+', Multibyte::trim($fragment));
276 $last_is_abbreviation = mb_substr(Multibyte::trim($fragment), -1) === '.';