public ProposedApproach(File uniFile, File triFile)
            throws IOException, ProcessException
    {
        // Load unigram data.
        Unigram.Data unigramData = Unigram.read(WordrtPreproc.BINARY, new File[] {uniFile});
        idMap = unigramData.unigramIDMap;
        freqs = unigramData.unigramCount;
        cMax = 0;
        for (long freq : freqs) {
            cMax = (freq > cMax ? freq : cMax);
        }
        // Load trigram data.
		BinaryFileFastRecordReader fastReader = new BinaryFileFastRecordReader(triFile);
        try {
            fastReader = new BinaryFileFastRecordReader(triFile);
    		MappedByteBuffer readerBuffer = fastReader.getBuffer();
    		long recordSize = readerBuffer.getLong();
    	    this.tNum = readerBuffer.getInt();
    	    this.uNum = readerBuffer.getInt();
        	this.tListStr = new int[this.uNum+1];
            this.tListEnd = new int[this.uNum+1];
            this.tListID  = new int[this.tNum];
            this.rt       = new double[this.tNum];
    		while (true) {
    			try {
    				//get next record length
    				recordSize = readerBuffer.getLong();
    				//check if EOF is reached
    				if (recordSize == 0) {
    					break;
    				} else if (readerBuffer.remaining() < recordSize) {
    					//check if buffer remaining size is bigger than record length
    					//refill buffer and check if buffer can be refill
    					if(! fastReader.refillBuffer())
    						break;
    					readerBuffer = fastReader.getBuffer();
    				}
    				//read record
    				int word1ID = readerBuffer.getInt();
    				int start = readerBuffer.getInt();
    				int end = readerBuffer.getInt();
    				this.tListStr[word1ID] = start;
    	    		this.tListEnd[word1ID] = end;
    	    		for (int i = start; i < end; i++) {
    	    			this.tListID[i] = readerBuffer.getInt();
    	    			this.rt[i] = readerBuffer.getDouble();
    	    		}
    			} catch (IOException e) {
    			}
    		}
        } finally {
            if (fastReader != null)
                fastReader.close();
        }
    }