Skip to content

Commit

Permalink
Adds note regarding AE standard (#481)
Browse files Browse the repository at this point in the history
* Adds note regarding AE standard

* Fixes bad copy/paste.
  • Loading branch information
gguuss authored and lesv committed Jan 17, 2017
1 parent df6ea40 commit 128338b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions language/analysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ for entity recognition.
This sample requires you to have
[Java8](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html).

**Note** The Natural Language client is not supported by App Engine Standard.

## Download Maven

This sample uses the [Apache Maven][maven] build system. Before getting started, be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public Analyze(LanguageServiceClient languageApi) {
* Gets {@link Entity}s from the string {@code text}.
*/
public List<Entity> analyzeEntitiesText(String text) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setContent(text).setType(Type.PLAIN_TEXT).build();
AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder()
Expand All @@ -182,6 +183,7 @@ public List<Entity> analyzeEntitiesText(String text) throws IOException {
* Gets {@link Entity}s from the contents of the object at the given GCS {@code path}.
*/
public List<Entity> analyzeEntitiesFile(String path) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setGcsContentUri(path).setType(Type.PLAIN_TEXT).build();
AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder()
Expand All @@ -195,6 +197,7 @@ public List<Entity> analyzeEntitiesFile(String path) throws IOException {
* Gets {@link Sentiment} from the string {@code text}.
*/
public Sentiment analyzeSentimentText(String text) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setContent(text).setType(Type.PLAIN_TEXT).build();
AnalyzeSentimentResponse response = languageApi.analyzeSentiment(doc);
Expand All @@ -205,6 +208,7 @@ public Sentiment analyzeSentimentText(String text) throws IOException {
* Gets {@link Sentiment} from the contents of the object at the given GCS {@code path}.
*/
public Sentiment analyzeSentimentFile(String path) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setGcsContentUri(path).setType(Type.PLAIN_TEXT).build();
AnalyzeSentimentResponse response = languageApi.analyzeSentiment(doc);
Expand All @@ -215,6 +219,7 @@ public Sentiment analyzeSentimentFile(String path) throws IOException {
* Gets {@link Token}s from the string {@code text}.
*/
public List<Token> analyzeSyntaxText(String text) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setContent(text).setType(Type.PLAIN_TEXT).build();
AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder()
Expand All @@ -228,6 +233,7 @@ public List<Token> analyzeSyntaxText(String text) throws IOException {
* Gets {@link Token}s from the contents of the object at the given GCS {@code path}.
*/
public List<Token> analyzeSyntaxFile(String path) throws IOException {
// Note: This does not work on App Engine standard.
Document doc = Document.newBuilder()
.setGcsContentUri(path).setType(Type.PLAIN_TEXT).build();
AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder()
Expand Down

0 comments on commit 128338b

Please sign in to comment.