public static long[] packPN(String b) {
        String[] ab = chordToArray(b);
        int longCount = (int) Math.ceil(ab.length/7.0);
        long[] ngrams = new long[longCount];
        for (int j = 0; j < longCount; j++){
        	long out = 0;
            int count = 0;
	        String[] a = Arrays.copyOfRange(ab, j*7, j+1 != longCount ? (j+1)*7 : ab.length);
	        for (int i = 0; i < Math.min(7, (j+1 == longCount && ab.length != 7) ? ab.length % 7 : 7); i++) {  
	        	out += (Long.parseLong(a[i]) & 0xff) << 8 * (7 - count);
	            count++;	            
	        }
	        if (longCount > 1 && j != longCount-1) out = out + 1; 
	        ngrams[j] = out;

        }
        return ngrams;
    }