public static void main(String[] args) throws JSONException, IOException{
		HashMap<String,HashSet<String>> productTerms = getTerms();
		
		HashMap<String,HashMap<String, ArrayList<String>>> productReviewSentances = getSentances();
		for(String productCode:productReviewSentances.keySet()){
			FileWriter file = new FileWriter(new File("Reviews-Results/" + productCode + "-results.txt"));
			System.out.println(productCode + ":");
			
			HashMap<String, ArrayList<String>> reviews = productReviewSentances.get(productCode);
			HashSet<String> terms = productTerms.get(productCode);
			
			int productCount = 0;
			int bothCount = 0;
			int serviceCount = 0;
			
			for(String user:reviews.keySet()){
				ArrayList<String> review = reviews.get(user);
				double termCount = 0;
				for(String sentance:review){
					for(String term:terms){
						if(sentance.contains(term)){
							termCount++;
						}
					}
				}
				
				double productTermFrequency = termCount/(double)review.size();
				String reviewCategory = "";
				if(productTermFrequency < 0.3){
					serviceCount++;
					reviewCategory = "Service";
				}
				else if(productTermFrequency < 0.6){
					bothCount++;
					reviewCategory = "Both";
				}
				else{
					productCount++;
					reviewCategory = "Product";
				}
				
				JSONObject resultReviewContainer = new JSONObject();
				resultReviewContainer.append("Username",user);
				resultReviewContainer.append("Review",review);
				resultReviewContainer.append("Review Category",reviewCategory);
				file.write(resultReviewContainer.toString());
				file.write('\n');
				file.flush();
			}
			
			file.close();
			System.out.println("Product: " + productCount);
			System.out.println("Both: " + bothCount);
			System.out.println("Service: " + serviceCount + "\n");
		}
	}