}
//loads the files and removes words which occur less than 5 tims
public void loadProgram() throws FileNotFoundException
{
Bag wordBag = new HashBag();
//Load all the medical files in the directory
File[] fileList = new File(recordsDir).listFiles();
for (int i = 0; i<fileList.length; i++) {
loadFile(fileList[i].toString(), wordBag);
}
//dump bag into frequent who appear in 5 or more medical records
for (Object obj : wordBag.uniqueSet()) {
if (wordBag.getCount(obj) > 4){
frequent.add((String)obj);
}
}
}