File tree Expand file tree Collapse file tree 3 files changed +49
-19
lines changed Expand file tree Collapse file tree 3 files changed +49
-19
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ java -cp target/language-entities-1.0-jar-with-dependencies.jar \
43
43
<text | GCS path>
44
44
```
45
45
46
- ### Usage Examples
46
+ ### Usage Examples (stable)
47
+
47
48
Analyze entities
48
49
```
49
50
java -cp target/language-entities-1.0-jar-with-dependencies.jar \
@@ -68,16 +69,6 @@ java -cp target/language-entities-1.0-jar-with-dependencies.jar \
68
69
"The quick brown fox jumped over the lazy dog."
69
70
```
70
71
71
- Analyze sentiment with Beta Languages such as German
72
- ```
73
- java -cp target/language-entities-1.0-jar-with-dependencies.jar \
74
- com.google.cloud.language.samples.AnalyzeBeta sentiment "Ich habe eine wundervolle Zeit." "DE"
75
- ```
76
- Analyze entity sentiment - Beta
77
- ```
78
- java -cp target/language-entities-1.0-jar-with-dependencies.jar com.google.cloud.language.samples.AnalyzeBeta entities-sentiment "The quick brown fox jumped over the lazy dog."
79
- ```
80
-
81
72
Included with the sample are ` demo.sh ` and ` demo.bat ` which show additional
82
73
examples of usage.
83
74
@@ -90,3 +81,25 @@ Run demo from Windows
90
81
```
91
82
demo
92
83
```
84
+
85
+ ### Usage Examples (beta)
86
+
87
+ Analyze sentiment beta
88
+ ```
89
+ java -cp target/language-entities-1.0-jar-with-dependencies.jar \
90
+ com.google.cloud.language.samples.AnalyzeBeta \
91
+ sentiment \
92
+ "Der schnelle braune Fuchs sprang über den faulen Hund."
93
+ ```
94
+
95
+ Analyze entity sentiment Beta
96
+ ```
97
+ 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."
100
+ ```
101
+
102
+ Run beta demo from * nix or OSX
103
+ ```
104
+ demo-beta.sh
105
+ ```
Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ Install [Maven](http://maven.apache.org/).
17
17
18
18
Build your project with:
19
19
20
- mvn clean package -DskipTests
21
-
22
- You can then run a given ` ClassName ` via:
23
-
24
- mvn exec:java -Dexec.mainClass=com.example.language.ClassName \
25
- -DpropertyName=propertyValue \
26
- -Dexec.args="arg1 'arg 2' arg3"
20
+ ``` bash
21
+ mvn clean compile assembly:single
22
+ ```
27
23
28
24
### Analyze a string for sentiment (using the quickstart sample)
29
25
30
- mvn exec:java -Dexec.mainClass=com.example.language.QuickstartSample
26
+ ```
27
+ java -cp target/language-google-cloud-samples-1.0.0-jar-with-dependencies.jar \
28
+ com.example.language.QuickstartSample
29
+ ```
Original file line number Diff line number Diff line change 54
54
<scope >test</scope >
55
55
</dependency >
56
56
</dependencies >
57
+
58
+ <build >
59
+ <plugins >
60
+ <plugin >
61
+ <artifactId >maven-assembly-plugin</artifactId >
62
+ <configuration >
63
+ <archive >
64
+ <manifest >
65
+ <mainClass >com.example.language.QuickstartSample</mainClass >
66
+ </manifest >
67
+ </archive >
68
+ <descriptorRefs >
69
+ <descriptorRef >jar-with-dependencies</descriptorRef >
70
+ </descriptorRefs >
71
+ </configuration >
72
+ </plugin >
73
+ </plugins >
74
+ </build >
57
75
</project >
You can’t perform that action at this time.
0 commit comments