diff --git a/language/analysis/src/main/java/com/google/cloud/language/samples/AnalyzeBeta.java b/language/analysis/src/main/java/com/google/cloud/language/samples/AnalyzeBeta.java index f3d2714be60..68fb135deb1 100644 --- a/language/analysis/src/main/java/com/google/cloud/language/samples/AnalyzeBeta.java +++ b/language/analysis/src/main/java/com/google/cloud/language/samples/AnalyzeBeta.java @@ -131,9 +131,7 @@ public static void printEntities(PrintStream out, List entities) { * Gets {@link Sentiment} from the string {@code text}. */ public Sentiment analyzeSentimentText(String text, String lang) throws IOException { - if (lang == null || lang.length() < 2) { - lang = "EN"; - } + // NL autodetects the language // Note: This does not work on App Engine standard. Document doc = Document.newBuilder()