src/Generic/Cbrne/results/CBRNEResultCollector.cpp
// to be valid, a prop must be VERB_PRED and have both a subject and either (object or indirect-object), such that
//  NEITHER is an unknown-entity mention

to be valid, a prop must be VERB_PRED and have both a subject and either (object or indirect-object), such that
NEITHER is an unknown-entity mention
to be valid a prop must be VERB_PRED and have both a subject and either ( object or indirect - object ) such that NEITHER is an unknown - entity mention
bool CBRNEResultCollector::isValidProposition(const Proposition *proposition, const int sentence_num) {
	const MentionSet *mentions = _docTheory->getSentenceTheory(sentence_num)->getMentionSet();
	if(proposition->getPredType() == Proposition::VERB_PRED) {
		const Mention *sub=0, *obj=0, *iobj=0, *prep=0;
		int i;
		for (i=0; i<proposition->getNArgs(); i++) {
			const Argument *arg = proposition->getArg(i);
			if(arg->getType() == Argument::MENTION_ARG) {
				const Mention *mention = arg->getMention(mentions);
				if(isValidEntityMention(mention) && isTypedEntityMention(mention))  {
					if(arg->getRoleSym() == Argument::SUB_ROLE)
						sub = mention;
					if(arg->getRoleSym() == Argument::OBJ_ROLE)
						obj = mention;
					if(arg->getRoleSym() == Argument::IOBJ_ROLE)
						iobj = mention;
					if(CBRNEWordConstants::isCBRNEReportedPreposition(arg->getRoleSym()))
						prep =  mention;
				}
			}
		}
		if(sub && (obj || iobj))
			return true;
		else return false;
	}
	else return false;
}
bool CBRNEResultCollector :: isValidProposition ( const Proposition * proposition , const int sentence_num ) { const MentionSet * mentions = _docTheory -> getSentenceTheory ( sentence_num ) -> getMentionSet ( ) ; if ( proposition -> getPredType ( ) == Proposition :: VERB_PRED ) { const Mention * sub = 0 , * obj = 0 , * iobj = 0 , * prep = 0 ; int i ; for ( i = 0 ; i < proposition -> getNArgs ( ) ; i ++ ) { const Argument * arg = proposition -> getArg ( i ) ; if ( arg -> getType ( ) == Argument :: MENTION_ARG ) { const Mention * mention = arg -> getMention ( mentions ) ; if ( isValidEntityMention ( mention ) && isTypedEntityMention ( mention ) ) { if ( arg -> getRoleSym ( ) == Argument :: SUB_ROLE ) sub = mention ; if ( arg -> getRoleSym ( ) == Argument :: OBJ_ROLE ) obj = mention ; if ( arg -> getRoleSym ( ) == Argument :: IOBJ_ROLE ) iobj = mention ; if ( CBRNEWordConstants :: isCBRNEReportedPreposition ( arg -> getRoleSym ( ) ) ) prep = mention ; } } } if ( sub && ( obj || iobj ) ) return true ; else return false ; } else return false ; }
to be valid, a prop must be VERB_PRED and have both a subject and either (object or indirect-object), such that
NEITHER is an unknown-entity mention
to be valid a prop must be VERB_PRED and have both a subject and either ( object or indirect - object ) such that NEITHER is an unknown - entity mention