Question

I'm unable to access the Google spell check service located at this address:

https://www.google.com/tbproxy/spell

is anyone else having this problem? I keep getting "bad gateway" when I try to connect. I'm pretty sure the service is offline.

Is there any news on what's going on? I know Google Drive went down a few weeks ago with the same set of error messages.

Was it helpful?

Solution

You can try this below Java code. This doesn't require any API Key. But please note, if you run it frequently, it will stop working as google blocks the IP Address from making future calls. You can use it on small data set. Not ideal solution, but if it is part of some batch job which runs in a while, then this approach may be acceptable to you.

public static String getSpellCheckedText(String Text) throws Exception {
    String google = "http://www.google.com/complete/search?output=toolbar&q=";
    String search = Text;
    String charset = "UTF-8";

    String spellCheckedText = Text;
    URL url = new URL(google + URLEncoder.encode(search, charset));
    Reader reader = new InputStreamReader(url.openStream(), charset);
    BufferedReader bufReader = new BufferedReader(reader);
    String line = bufReader.readLine();
    StringBuffer sBuffer = new StringBuffer();
    while (line != null) {
        sBuffer.append(line).append("\n");
        line = bufReader.readLine();
    }
    String content = sBuffer.toString();

    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    InputSource is = new InputSource(new StringReader(content));
    Document document = builder.parse(is);
    NodeList nodeList = document.getElementsByTagName("suggestion");
    if (nodeList != null && nodeList.getLength() > 0) {
        org.w3c.dom.Node elm = nodeList.item(0);
        if (elm.getNodeType() == Node.ELEMENT_NODE) {
            Element suggestionElement = (Element)elm;
            String suggestedString = suggestionElement.getAttribute("data");
            if (suggestedString != null && suggestedString.trim().length() != 0) {
                spellCheckedText = suggestedString.trim();
                System.out.println(Text + " => "+ spellCheckedText);
            }
        }
    }
    return spellCheckedText;
}

OTHER TIPS

I am also having this problem. I am getting a 503 Server Error. The problem is definitely on Google's end. (N.B. I am on Safari 6.0.3)

In specific...

503. That's an error.  

The service you requested is not available at this time.

Service error -27. That’s all we know.

It seems as though Google is having some problems with their services. Hopefully they fix it soon!

Ditto, here. I really depend on it to check spelling in text boxes. It says "Unable to connect to Google spelling servers. Please check your internet connection and try again"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top