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 \
4343 <text | GCS path>
4444```
4545
46- ### Usage Examples
46+ ### Usage Examples (stable)
47+
4748Analyze entities
4849```
4950java -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 \
6869 "The quick brown fox jumped over the lazy dog."
6970```
7071
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-
8172Included with the sample are ` demo.sh ` and ` demo.bat ` which show additional
8273examples of usage.
8374
@@ -90,3 +81,25 @@ Run demo from Windows
9081```
9182demo
9283```
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/).
1717
1818Build your project with:
1919
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+ ```
2723
2824### Analyze a string for sentiment (using the quickstart sample)
2925
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 5454 <scope >test</scope >
5555 </dependency >
5656 </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 >
5775</project >
You can’t perform that action at this time.
0 commit comments