src/Generic/theories/MentionConfidence.cpp
/* MRF this is the same as enNodeInfo::isNominalPremod except it excludes Adjective premods */
MRF this is the same as enNodeInfo::isNominalPremod except it excludes Adjective premods
MRF this is the same as enNodeInfo :: isNominalPremod except it excludes Adjective premods
bool MentionConfidence::enIsNominalPremod(const SynNode *node) {
	Symbol tag = node->getTag();
	if (( tag == EN_NN ||
		tag == EN_NNS ||
		tag == EN_NNP ||
		tag == EN_NNPS)	&&
		node->getParent() != 0 &&
		node->getParent()->getTag() != EN_NPP &&
		node->getParent()->getHead() != node)
	{
		const SynNode *parent = node->getParent();
		for (int i = parent->getHeadIndex();
			 i > 0 && parent->getChild(i) != node; i--)
		{
			if (parent->getChild(i)->getTag() == EN_COMMA)
				return false;
		}
		return true;
	}
	else {
		return false;
	}
}
bool MentionConfidence :: enIsNominalPremod ( const SynNode * node ) { Symbol tag = node -> getTag ( ) ; if ( ( tag == EN_NN || tag == EN_NNS || tag == EN_NNP || tag == EN_NNPS ) && node -> getParent ( ) != 0 && node -> getParent ( ) -> getTag ( ) != EN_NPP && node -> getParent ( ) -> getHead ( ) != node ) { const SynNode * parent = node -> getParent ( ) ; for ( int i = parent -> getHeadIndex ( ) ; i > 0 && parent -> getChild ( i ) != node ; i -- ) { if ( parent -> getChild ( i ) -> getTag ( ) == EN_COMMA ) return false ; } return true ; } else { return false ; } }
MRF this is the same as enNodeInfo::isNominalPremod except it excludes Adjective premods
MRF this is the same as enNodeInfo :: isNominalPremod except it excludes Adjective premods