com.google.api.detect
Class Detect

java.lang.Object
  extended by com.google.api.GoogleAPI
      extended by com.google.api.detect.Detect

public class Detect
extends GoogleAPI

Makes the Google Detect API available to Java applications.

Author:
Richard Midwinter, Soren AD

Field Summary
 
Fields inherited from class com.google.api.GoogleAPI
ENCODING, referrer
 
Constructor Summary
Detect()
           
 
Method Summary
static DetectResult execute(String text)
          Detects the language of a supplied String.
 
Methods inherited from class com.google.api.GoogleAPI
retrieveJSON, retrieveJSON, setHttpReferrer, validateReferrer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Detect

public Detect()
Method Detail

execute

public static DetectResult execute(String text)
                            throws Exception
Detects the language of a supplied String.

Parameters:
text - The String to detect the language of.
Returns:
A DetectResult object containing the language, confidence and reliability.
Throws:
Exception - on error.


Copyright © 2011. All Rights Reserved.