public static KeywordData[] toKeywordData(StatusMessage[] statuses) {
		
		List<KeywordData> keywordDataList = new LinkedList<KeywordData>();
		StringBuilder dataBuilder = new StringBuilder();
		String myText = extractText(statuses);
		String queryURI = ENDPOINT + PARAMS + myText;
		URL url;
		InputStream is = null;
		DataInputStream dis;
		int intChar;
		try {
		    url = new URL(queryURI);
		    is = url.openStream();  // throws an IOException
		    dis = new DataInputStream(new BufferedInputStream(is));
		    while ((intChar = dis.read()) != -1) {
		        dataBuilder.append(((char)intChar));
		    }
		} catch (MalformedURLException mue) {
		     mue.printStackTrace();
		} catch (IOException ioe) {
		     ioe.printStackTrace();
		} finally {
		    try {
		        is.close();
		    } catch (IOException ioe) {
		    }
		}
		
		String xmlString = dataBuilder.toString();
		Document doc = XMLUtil.loadXML(xmlString);
		doc.getDocumentElement().normalize();
		Element results = doc.getDocumentElement();
		NodeList keywords = results.getElementsByTagName("keyword");
		for (int i = 0; i < keywords.getLength(); i++) {
			Node keywordNode = keywords.item(i);
			if (keywordNode.getNodeType() == Node.ELEMENT_NODE) {
				Element keywordElement = (Element) keywordNode;
				keywordDataList.add(new KeywordData(
						XMLUtil.getTagValue("text", keywordElement),statuses));
			}
		}
		return keywordDataList.toArray(new KeywordData[keywordDataList.size()]);
	}