package hk.ust.comp4321.test;

import java.io.IOException;

import hk.ust.comp4321.engine.PageRank;

public class TestPageRank
{
  public static void main(String[] args) throws IOException
  {
    PageRank pageRank = new PageRank("Movie");
  }
}

@@ -43,199 +43,2118 @@
 .io.
-IOException;%0A%0Aimport hk.ust.comp4321.engine.PageRank;%0A%0Apublic class TestPageRank%0A%7B%0A  public static void main(String%5B%5D args) throws IOException%0A  %7B%0A    PageRank pageRank = new PageRank(%22Movie%22
+FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.PrintStream;%0Aimport java.util.List;%0A%0Aimport hk.ust.comp4321.database.DocInfo;%0Aimport hk.ust.comp4321.database.ForwardIndexTable;%0Aimport hk.ust.comp4321.database.InvertedPageTable;%0Aimport hk.ust.comp4321.database.InvertedWordTable;%0Aimport hk.ust.comp4321.database.PageInfo;%0Aimport hk.ust.comp4321.engine.PageRank;%0Aimport hk.ust.comp4321.engine.PhraseChecker;%0A%0Apublic class TestPageRank%0A%7B%0A  private static InvertedPageTable invertedPageTable = InvertedPageTable.getTable();%0A  private static ForwardIndexTable forwardIndexTable = ForwardIndexTable.getTable();%0A  private static InvertedWordTable invertedWordTable = InvertedWordTable.getTable();%0A%0A  public static void main(String%5B%5D args) throws IOException%0A  %7B%0A    PrintStream out = new PrintStream(new FileOutputStream(%0A      %22test.txt%22));%0A    PageRank pageRank = new PageRank(%22%5C%22literature listings%5C%22%22);%0A    double%5B%5D score = pageRank.returnTotalSimScore();%0A    int%5B%5D rank = pageRank.returnRankedList();%0A    for(int i = 0; i %3C rank.length && i %3C 50 && score%5Bi%5D != 0 && new PhraseChecker(%22%5C%22literature listings%5C%22%22, rank%5Bi%5D).isConsecutive(); i++)%0A      %7B%0A        out.println(%22Score: %22 + score%5Bi%5D);%0A        PageInfo pageInfo = invertedPageTable .getPageInfo (rank%5Bi%5D);%0A        out.println(%22Title: %22 + pageInfo.getTitle());%0A        out.println(%22URL: %22 + pageInfo.getUrl());%0A        out.println(%22Last modification date: %22 + pageInfo.getDate());%0A        out.println(%22Page size: %22 + pageInfo.getSize() + %22byte%22);%0A        List%3CDocInfo%3E docInfoList = forwardIndexTable.getDocInfoList (rank%5Bi%5D);%0A        for(int j = 0; j %3C docInfoList.size(); j++)%0A          %7B%0A            String word = invertedWordTable .getWord (docInfoList.get (j).getId());%0A            out.print(word + %22 %22 + docInfoList.get (j).getFrequency() + %22; %22);%0A          %7D%0A        out.println(%22%22);%0A        List%3CString%3E childLinks = pageInfo.getChildLinks();%0A        for(int j = 0; j %3C childLinks.size(); j++)%0A          out.println(childLinks.get(j));%0A        out.println(%22----------------------------------------------------%22);%0A      %7D%0A    out.close(
 );%0A 

Update to test phrase checker