public static double[][] getSynonymyMatrix( String[] words1, String[] words2 ) {
		List<Set<String>> synonyms1 = new ArrayList<Set<String>>( words1.length );
		List<Set<String>> synonyms2 = new ArrayList<Set<String>>( words2.length );
		
		for ( int i=0; i<words1.length; i++ ) {
			Set<String> synonyms = new LinkedHashSet<String>();
			for ( POS pos : POS.values() ) {
				synonyms.addAll( JAWJAW.findSynonyms( words1[i], pos ) );
			}
			synonyms1.add( synonyms );
		}
		for ( int j=0; j<words2.length; j++ ) {
			Set<String> synonyms = new LinkedHashSet<String>();
			for ( POS pos : POS.values() ) {
				synonyms.addAll( JAWJAW.findSynonyms( words2[j], pos ) );
			}
			synonyms2.add( synonyms );
		}
		
		double[][] result = new double[words1.length][words2.length];
		for ( int i=0; i<words1.length; i++ ) {
			for ( int j=0; j<words2.length; j++ ) {
				String w1 = words1[i];
				String w2 = words2[j];
				if ( w1.equals( w2 ) ) {
					result[i][j] = 1D;
					continue;
				}
				Set<String> s1 = synonyms1.get(i);
				Set<String> s2 = synonyms2.get(j);
				
				result[i][j] = (s1.contains(w2) || s2.contains(w1))?1:0;
			}
		}
		return result;
	}