Skip to content

Commit

Permalink
no need to test lang (#629)
Browse files Browse the repository at this point in the history
as NL does autodetect of language
  • Loading branch information
merla18 authored and lesv committed Apr 26, 2017
1 parent 5965fb7 commit 21557d3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ public static void printEntities(PrintStream out, List<Entity> 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()
Expand Down

0 comments on commit 21557d3

Please sign in to comment.