src/PredFinder/macros/IndividualParameter.cpp
/**
 * Use the text and offsets from a reference relation
 * to generate an individual for this parameter's type.
 *
 * @param docid The ID of the document that will contain
 * this generated individual.
 * @param reference_relation The input relation from
 * which type provenance is determined.
 * @return A new individual containing the copied provenance.
 *
 * @author nward@bbn.com
 * @date 2010.10.18
 **/
Use the text and offsets from a reference relation
to generate an individual for this parameter's type.

@param docid The ID of the document that will contain
this generated individual.
@param reference_relation The input relation from
which type provenance is determined.
@return A new individual containing the copied provenance.


Use the text and offsets from a reference relation to generate an individual for this parameter ' s type . @param docid The ID of the document that will contain this generated individual . @param reference_relation The input relation from which type provenance is determined . @return A new individual containing the copied provenance .
ElfIndividual_ptr IndividualParameter::to_elf_individual(ElfDocument_ptr document, ElfRelation_ptr reference_relation) {
	boost::hash<ElfRelation_ptr> relation_hasher;
	std::wstringstream id;
	id << document->replace_uri_prefix(_individual_type) << "-" << document->get_id() << "-" << relation_hasher(reference_relation);
	ElfType_ptr individual_type = boost::make_shared<ElfType>(_individual_type, reference_relation->get_text(), reference_relation->get_start(), reference_relation->get_end());
	ElfString_ptr individual_desc = boost::make_shared<ElfDescriptor>(reference_relation->get_text(), -1.0, reference_relation->get_text(), reference_relation->get_start(), reference_relation->get_end());
	ElfIndividual_ptr individual = boost::make_shared<ElfIndividual>(id.str(), individual_desc, individual_type);
	return individual;
}
ElfIndividual_ptr IndividualParameter :: to_elf_individual ( ElfDocument_ptr document , ElfRelation_ptr reference_relation ) { boost :: hash < ElfRelation_ptr > relation_hasher ; std :: wstringstream id ; id << document -> replace_uri_prefix ( _individual_type ) << " " << document -> get_id ( ) << " " << relation_hasher ( reference_relation ) ; ElfType_ptr individual_type = boost :: make_shared < ElfType > ( _individual_type , reference_relation -> get_text ( ) , reference_relation -> get_start ( ) , reference_relation -> get_end ( ) ) ; ElfString_ptr individual_desc = boost :: make_shared < ElfDescriptor > ( reference_relation -> get_text ( ) , -1.0 , reference_relation -> get_text ( ) , reference_relation -> get_start ( ) , reference_relation -> get_end ( ) ) ; ElfIndividual_ptr individual = boost :: make_shared < ElfIndividual > ( id . str ( ) , individual_desc , individual_type ) ; return individual ; }
Use the text and offsets from a reference relation
 to generate an individual for this parameter's type.
Use the text and offsets from a reference relation to generate an individual for this parameter ' s type .
// Generate a new unique identifier for this individual
 // Return a new individual containing the provenance of the relation that produced it
