private static boolean isCompoundNoun(final ExpressionType curType,final ExpressionType nextType,final boolean precedingVerb){
  final boolean nextIsSubjObjName=nextType.isObject() || (nextType.isSubject() && !nextType.isPronoun());
  if (nextIsSubjObjName) {
    final boolean currIsSubjObj=curType.isObject() || (curType.isSubject() && !curType.isPronoun() && !curType.isName());
    if (currIsSubjObj) {
      return true;
    }
 else     if (curType.isAdjective()) {
      return true;
    }
 else     if (curType.isVerb() && precedingVerb) {
      return true;
    }
  }
  return false;
}

private static boolean isCompoundNoun ( final ExpressionType curType , final ExpressionType nextType , final boolean precedingVerb ) { final boolean nextIsSubjObjName = nextType . isObject ( ) || ( nextType . isSubject ( ) && ! nextType . isPronoun ( ) ) ; if ( nextIsSubjObjName ) { final boolean currIsSubjObj = curType . isObject ( ) || ( curType . isSubject ( ) && ! curType . isPronoun ( ) && ! curType . isName ( ) ) ; if ( currIsSubjObj ) { return true ; } else if ( curType . isAdjective ( ) ) { return true ; } else if ( curType . isVerb ( ) && precedingVerb ) { return true ; } } return false ; }
decide if the given two expressions form a compound noun .
