Package com.google.api.detect

Examples of com.google.api.detect.DetectResult


  public void testDetect() throws Exception {
    System.out.println("testDetect");
   
    GoogleAPI.setHttpReferrer("http://code.google.com/p/google-api-translate-java/");
   
    DetectResult detectResult = Detect.execute("Hello world");
   
    assertEquals(Language.ENGLISH, detectResult.getLanguage());
    assertTrue(detectResult.getConfidence() > 0);
  }
View Full Code Here

TOP

Related Classes of com.google.api.detect.DetectResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.