code: private void processWordsInNP(ArrayList<Pair<String>> wordsInPhrase) {
  	if( wordsInPhrase.size() > 1 ) {
  	    // this is from Grefenstette's pseudo code
  	    for (int i = 0; i < wordsInPhrase.size()-1; i++) {
  
  		if (inStartSet(wordsInPhrase.get(i).x) ) {
  		
  		    for (int j = i+1; j < wordsInPhrase.size(); j++ ) {
  			
  			if (inReceiveSet( wordsInPhrase.get(j).x ) ) {
  
  			    wordRelationsWriter.
  				println(wordsInPhrase.get(j).y + " "
  					+ wordsInPhrase.get(i).y);
  			    
  // 			    System.out.println(wordsInPhrase.get(j).y + " "
  // 					       + wordsInPhrase.get(i).y);
  			    
  			    addRelation(wordsInPhrase.get(j).y, 
  					wordsInPhrase.get(i).y);
  			}
  		    }
  		}
  	    }
  	}
      }
docs: Creates relations between words in a noun phrase