private static Map<String, String> retornaRecomendacoesDbpedia(
			String mensagem, Map<String, String> mapa, String textoAnterior,
			String entidadesAnteriores) {

		URIBuilder builder = new URIBuilder();
		builder.setScheme("http").setHost("spotlight.sztaki.hu:2228/rest")
				.setPath("/annotate").setParameter("text", mensagem)
				.setParameter("confidence", "0.1").setParameter("support", "4")
				.setParameter("spotter", "Default")
				.setParameter("disambiguator", "Default")
				.setParameter("policy", "whitelist");
		URI uri = null;
		try {
			uri = builder.build();
		} catch (URISyntaxException e1) {
			return mapa;
		}
		HttpGet httpget = new HttpGet(uri);
		httpget.setHeader("Accept", "application/json");

		HttpParams httpParameters = new BasicHttpParams();
		// Timeout para o caso do servidor estar fora do ar
		int timeoutConnection = 3000;
		HttpConnectionParams.setConnectionTimeout(httpParameters,
				timeoutConnection);
		int timeoutSocket = 5000;
		HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);

		DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);

		HttpResponse response = null;
		try {
			response = httpclient.execute(httpget);
		} catch (Exception e) {
			return mapa;
		}
		HttpEntity entity = response.getEntity();

		JsonElement jelement = null;
		try {
			jelement = new JsonParser().parse(EntityUtils.toString(entity,
					HTTP.UTF_8).trim());
		} catch (Exception e) {
			return mapa;
		}
		JsonObject jobject = jelement.getAsJsonObject();
		JsonPrimitive textoJson = jobject.getAsJsonPrimitive("@text");
		String texto = textoJson.getAsString();

		if (jobject.getAsJsonArray("Resources") != null
				&& jobject.getAsJsonArray("Resources").size() > 0) {
			for (int i = 0; i < jobject.getAsJsonArray("Resources").size(); i++) {
				String URI = jobject.getAsJsonArray("Resources").get(i)
						.getAsJsonObject().getAsJsonPrimitive("@URI")
						.getAsString();
				String palavra = jobject.getAsJsonArray("Resources").get(i)
						.getAsJsonObject().getAsJsonPrimitive("@surfaceForm")
						.getAsString();

				String sparqlQuery =

				"PREFIX owl: <http://www.w3.org/2002/07/owl#> "
						+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> "
						+

						"select ?resumo where { " +

						"?recurso owl:sameAs <" + URI + ">. "
						+ "?recurso  rdfs:comment ?resumo. "
						+ "FILTER (LANG(?resumo) = 'pt') " +

						"  }";

				// Cria uma query com o string
				Query query = QueryFactory.create(sparqlQuery);

				// Faz o sparql no servidor indicado
				QueryExecution qexec = QueryExecutionFactory.sparqlService(
						"http://dbpedia.org/sparql", query);

				// Recupera os resultados da query
				ResultSet resultSet = qexec.execSelect();
				String resumo = "";

				for (; resultSet.hasNext();) {
					QuerySolution soln = resultSet.nextSolution();
					Literal l = soln.getLiteral("resumo");
					resumo = l.getString();

				}
				qexec.close();

				mapa = atualizaMapa(palavra, resumo, texto, mapa,
						textoAnterior, entidadesAnteriores);

			}
		}
		return mapa;

	}