private double[] createArray(HttpEntity entity) {
		
		double sentArray[] = new double[3];
		try {
			String parseString = (new BufferedReader(new InputStreamReader(entity.getContent(), "UTF-8"))).readLine();
			
			JSONParser jparser = new JSONParser();
			JSONObject dataObject = (JSONObject) jparser.parse(parseString);
			JSONArray mainArray = (JSONArray) dataObject.get("data");
			Iterator<?> iterator = mainArray.iterator();
			int polarity;
			while(iterator.hasNext()) {
				polarity = Integer.parseInt(((JSONObject) iterator.next()).get("polarity").toString());
				switch (polarity) {
					case 0:
						//negative
						sentArray[0]+=1;
						break;
					case 2:
						//neutral
						sentArray[1]+=1;
						break;
					case 4:
						//positive
						sentArray[2]+=1;		
				}
			}
			
			double total = sentArray[0]+sentArray[1]+sentArray[2];
			sentArray[0]=sentArray[0]*100/total;
			sentArray[1]=sentArray[1]*100/total;
			sentArray[2]=sentArray[2]*100/total;
			
		} catch(UnsupportedEncodingException e) {
			Logger.getLogger(Sentiment.class.getName()).log(Level.SEVERE, null, e);
		} catch(IllegalStateException e) {
			Logger.getLogger(Sentiment.class.getName()).log(Level.SEVERE, null, e);
		} catch(IOException e) {
			Logger.getLogger(Sentiment.class.getName()).log(Level.SEVERE, null, e);
		} catch(ParseException e) {
			Logger.getLogger(Sentiment.class.getName()).log(Level.SEVERE, null, e);
		}
			
		return sentArray;
	}