src/Arabic/relations/ar_PotentialRelationExtractor.cpp
/**
 * @param token the token to search.
 * @return the Idf name span that covers the given token, if any.
 */
@param token the token to search.
@return the Idf name span that covers the given token, if any.
@param token the token to search . @return the Idf name span that covers the given token if any .
IdfSpan* PotentialRelationExtractor::getIdfSpan(const Token *token)
{
	PotentialRelationExtractor::IdfSpanFilter filter;
	IdfSpan *span = NULL;
	Metadata::SpanList *list = _metadata->getCoveringSpans(token->getStartEDTOffset(), &filter);
	if (list->length() > 0) {
		span = (IdfSpan *)((*list)[0]);
	}
	delete list;
	return span;
}
IdfSpan * PotentialRelationExtractor :: getIdfSpan ( const Token * token ) { PotentialRelationExtractor :: IdfSpanFilter filter ; IdfSpan * span = NULL ; Metadata :: SpanList * list = _metadata -> getCoveringSpans ( token -> getStartEDTOffset ( ) , & filter ) ; if ( list -> length ( ) > 0 ) { span = ( IdfSpan * ) ( ( * list ) [ 0 ] ) ; } delete list ; return span ; }
@param token the token to search.
@param token the token to search .
// Find any Idf spans at the token's start offset.
