GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Language samples (#845) · edr1/java-docs-samples@2ec36ec

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • language
    • analysis
      • README.md
      • pom.xml
      • src
        • main/java/com/google/cloud/language/samples
          • Analyze.java
          • AnalyzeBeta.java
        • test/java/com/google/cloud/language/samples
          • AnalyzeBetaIT.java
          • AnalyzeIT.java
          • AnalyzeTest.java
    • cloud-client
      • pom.xml
      • src
        • main/java/com/example/language
          • QuickstartSample.java
        • test/java/com/example/language
          • QuickstartSampleIT.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎language/analysis/README.md‎

Copy file name to clipboardExpand all lines: language/analysis/README.md
+19-5Lines changed: 19 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ mvn clean compile assembly:single
3232
```
3333

3434
We can then run the assembled JAR file with the `java` command. The variable $COMMAND takes
35-
three values `entities`, `sentiment`, or `syntax`.
35+
three values `entities`, `entities-sentiment`, `sentiment`, or `syntax`.
3636

3737
## Basic usage:
3838

3939
```
4040
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
4141
com.google.cloud.language.samples.Analyze \
42-
<entities | sentiment | syntax> \
42+
<entities | entities-sentiment | sentiment | syntax> \
4343
<text | GCS path>
4444
```
4545

@@ -61,6 +61,13 @@ java -cp target/language-entities-1.0-jar-with-dependencies.jar \
6161
"The quick brown fox jumped over the lazy dog."
6262
```
6363

64+
Analyze entity sentiment
65+
```
66+
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
67+
com.google.cloud.language.samples.Analyze entities-sentiment \
68+
"There's nothing better than searching for ice cream on Google."
69+
```
70+
6471
Analyze syntax
6572
```
6673
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
@@ -92,11 +99,18 @@ java -cp target/language-entities-1.0-jar-with-dependencies.jar \
9299
"Der schnelle braune Fuchs sprang über den faulen Hund."
93100
```
94101

95-
Analyze entity sentiment Beta
102+
Analyze categories in text Beta
96103
```
97104
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
98-
com.google.cloud.language.samples.AnalyzeBeta entities-sentiment \
99-
"There's nothing better than searching for ice cream on Google."
105+
com.google.cloud.language.samples.AnalyzeBeta classify \
106+
"Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets."
107+
```
108+
109+
Analyze categories in GCS file Beta
110+
```
111+
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
112+
com.google.cloud.language.samples.AnalyzeBeta classify \
113+
"gs://cloud-samples-tests/natural-language/android-text.txt"
100114
```
101115

102116
Run beta demo from *nix or OSX
Collapse file

‎language/analysis/pom.xml‎

Copy file name to clipboardExpand all lines: language/analysis/pom.xml
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ limitations under the License.
3232
<dependency>
3333
<groupId>com.google.cloud</groupId>
3434
<artifactId>google-cloud-language</artifactId>
35-
<version>0.21.1-beta</version>
35+
<version>0.24.0-beta</version>
3636
</dependency>
3737
<dependency>
3838
<groupId>com.google.guava</groupId>
@@ -41,13 +41,6 @@ limitations under the License.
4141
</dependency>
4242
<!-- [END dependencies] -->
4343

44-
<!-- FIXME: remove after client fixes depenency issue -->
45-
<dependency>
46-
<groupId>com.google.auth</groupId>
47-
<artifactId>google-auth-library-oauth2-http</artifactId>
48-
<version>0.7.1</version>
49-
</dependency>
50-
5144
<!-- Test Dependencies -->
5245
<dependency>
5346
<groupId>junit</groupId>

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.