src/Arabic/descriptors/DescriptorClassifierTrainer/ar_DescriptorClassifierTrainer.cpp
// this was borrowed from ArabicDescriptorClassifier.
// TODO: have some utility functions area?

this was borrowed from ArabicDescriptorClassifier.
this was borrowed from ArabicDescriptorClassifier .
const SynNode* ArabicDescriptorClassifierTrainer::getFunctionalParentNode(const SynNode* node) {
	if( node == 0 )
		return 0;
	const SynNode* nd = node;
	while( nd != 0 &&
		nd->getParent() != 0 &&
		nd->getParent()->getHead() == nd )
		nd = nd->getParent();
	if( nd != 0 && nd->getParent() != 0 )
		return nd->getParent();
	return 0; 
}
const SynNode * ArabicDescriptorClassifierTrainer :: getFunctionalParentNode ( const SynNode * node ) { if ( node == 0 ) return 0 ; const SynNode * nd = node ; while ( nd != 0 && nd -> getParent ( ) != 0 && nd -> getParent ( ) -> getHead ( ) == nd ) nd = nd -> getParent ( ) ; if ( nd != 0 && nd -> getParent ( ) != 0 ) return nd -> getParent ( ) ; return 0 ; }
this was borrowed from ArabicDescriptorClassifier.
this was borrowed from ArabicDescriptorClassifier .
// otherwise we can't use it anyway
