code: protected static Set<String> loadValidTermSet(String validTermsFileName) 
          throws IOException {
  
          Set<String> validTerms = new HashSet<String>();
          BufferedReader br = new BufferedReader(
              new FileReader(validTermsFileName));
          
          for (String line = null; (line = br.readLine()) != null; ) {
              validTerms.add(line);
          }
           
          br.close();
  
          return validTerms;
      }
docs: Returns a set of terms based on the contents of the provided file.  Each
  word is expected to be on its own line.