public ArrayList<Sentence> ExtractSentences(String inputNum, List<Datum> datums) throws IOException {
        ArrayList<Sentence> sentences = Sentence.DatumToSentence(datums);
        int numOfSen = sentences.size();

        na.nounAnaphoring(sentences);
//        SentenceRedundancing(datums);
        /// Set mapSenOrderByScore
        System.out.println("Start of sen-scoring");
        double[] senScore = new double[numOfSen];
        int[] senIndex = new int[numOfSen];
        for (int i = 0; i < numOfSen; i++) {
            ArrayList<Datum> seni = sentences.get(i).dataList;
            int numOfPhr_i = seni.get(seni.size() - 1).iPhrase + 1;
            senScore[i] = 0.0;
            senIndex[i] = i;
            int tf = 0;
            for (Datum dt : seni) {
                if (!dt.stopWord) {
                    tf += dt.tf;
                }
            }
            senScore[i] = tf / (double) numOfPhr_i;
        }
        QuickSort.QuickSort(senScore, senIndex, 0, numOfSen - 1);
        int remainSen = (int) (2 * numOfSen / 3) + 1;
        int[] topSenIndex = new int[remainSen];
        int[] topSenIndexTmp = new int[remainSen];
        System.arraycopy(senIndex, 0, topSenIndex, 0, remainSen);
        System.arraycopy(topSenIndex, 0, topSenIndexTmp, 0, remainSen);
        QuickSort.QuickSort(topSenIndexTmp, 0, remainSen - 1);
        for (int i = 0; i < topSenIndexTmp.length; i++) {
            for (int j = 0; j < topSenIndex.length; j++) {
                if (topSenIndexTmp[i] == topSenIndex[j]) {
                    topSenIndex[j] = i;     /// update sentence index after removing
                }
            }
        }
        for (int i = 0; i < topSenIndex.length; i++) {
            mapSenOrderByScore.put(topSenIndex[i], i);
        }
        System.out.println("End of sen-scoring...");

// <editor-fold defaultstate="collapsed" desc="Đoạn này không hiểu để làm gì">
//        String taggerExt = "";
//        String strExtract = "";                     //out-string extraction
//        String[] strSen = new String[remainSen];
//        for (int i = 0; i < remainSen; i++) {
//            int tmp = topSen[i];
//            strSen[i] = "";
//            for (Datum dt : datums) {
//                if (dt.iSentence == tmp) {
//                    strExtract += dt.word + " ";
//                    strSen[i] += dt.word + " ";
//                    taggerExt += dt.word + "/" + dt.posTag + "/" + dt.chunk + "/" + dt.iPhrase + "\n";
//                }
//            }
//            strExtract += "\n";
//        }
// </editor-fold>
        // Remove unimportant sentences 
        QuickSort.QuickSort(senIndex, remainSen, senIndex.length - 1);
        for (int i = senIndex.length - 1; i >= remainSen; i--) {
//            sentences.remove(senIndex[i] - (i - remainSen));
            sentences.remove(senIndex[i]);
        }
//        System.out.println(remainSen + " sentences remain");

        return sentences;
    }