src/Generic/sentences/DefaultSentenceBreaker.cpp
// Returns true if a sentence break is NOT permitted between index and index-1 

Returns true if a sentence break is NOT permitted between index and index-1
Returns true if a sentence break is NOT permitted between index and index - 1
bool DefaultSentenceBreaker::inRestrictedBreakSpan(Metadata *metadata, const LocatedString *input, int index) const {
	if (index < 1 || index >= input->length()) 
		return false;
	bool restrict_break = false;
	EDTOffset last_index = input->lastEndOffsetEndingAt<EDTOffset>(index - 1);
	EDTOffset next_index = input->start<EDTOffset>(index);
	Metadata::SpanList *list = metadata->getCoveringSpans(last_index);
	for (int i = 0; i < list->length(); i++)
	{
		Span *coveringSpan = (*list)[i];
		if (coveringSpan->restrictSentenceBreak() && 
			coveringSpan->covers(next_index)) 
		{
			restrict_break = true;
			break;
		}
	}
	delete list;
	return restrict_break;
}
bool DefaultSentenceBreaker :: inRestrictedBreakSpan ( Metadata * metadata , const LocatedString * input , int index ) const { if ( index < 1 || index >= input -> length ( ) ) return false ; bool restrict_break = false ; EDTOffset last_index = input -> lastEndOffsetEndingAt < EDTOffset > ( index - 1 ) ; EDTOffset next_index = input -> start < EDTOffset > ( index ) ; Metadata :: SpanList * list = metadata -> getCoveringSpans ( last_index ) ; for ( int i = 0 ; i < list -> length ( ) ; i ++ ) { Span * coveringSpan = ( * list ) [ i ] ; if ( coveringSpan -> restrictSentenceBreak ( ) && coveringSpan -> covers ( next_index ) ) { restrict_break = true ; break ; } } delete list ; return restrict_break ; }
Returns true if a sentence break is NOT permitted between index and index-1
Returns true if a sentence break is NOT permitted between index and index - 1