Skip to content

Commit f5720bf

Browse files
author
Kathy Czeck
committed
Modified Examples README as well
1 parent 30b09c8 commit f5720bf

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Build Status](https://travis-ci.org/rosette-api/java.svg?branch=master)](https://travis-ci.org/rosette-api/java)
1+
[![Build Status](https://travis-ci.org/rosette-api/java.svg?branch=master)](https://travis-ci.org/rosette-api/java)
22
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding)
33

44
# Java client binding for Rosette API #

examples/src/main/java/com/basistech/rosette/examples/README.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Rosette API Java Examples
33

44
Each example class can be run independently.
55

6+
Each example file demonstrates one of the capabilities of the Rosette Platform.
7+
8+
A note on pre-requisites. Rosette API only suports TLS 1.2 so ensure your toolchain also supports it.
9+
10+
##Maven ##
611
If you use Maven, everything should have been setup and you can start running the examples using `mvn exec:java`.
712
Otherwise you can compile and run these examples by hand:
813

@@ -11,27 +16,20 @@ Otherwise you can compile and run these examples by hand:
1116
- `cd src/main/java/com/basistech/rosette/examples`
1217
- `javac -cp .:<path-to-rosette-api-jar-file> *.java`
1318
- `java -cp .:<path-to-rosette-api-jar-file> -Drosette.api.key=<your-api-key> com.basistech.rosette.examples.<XyzExample>`
14-
15-
| File Name | Description
16-
| ------------- |-------------
17-
| CategoriesExample.java | Gets the category of a document at a URL
18-
| EntitiesExample.java | Extracts entities
19-
| InfoExample.java | Gets information about Rosette API
20-
| LanguageExample.java | Detects language
21-
| MorphologyCompleteExample.java | Gets the complete morphological analysis
22-
| MorphologyCompoundComponentsExample.java | Gets the de-compounded words
23-
| MorphologyHanReadingsExample.java | Gets the Chinese/Han readings
24-
| MorphologyLemmasExample.java | Gets the lemmas
25-
| MorphologyPartsOfSpeechExample.java | Gets the part-of-speech tags
26-
| NameDeduplicationExample.java | Gets a list of cluster IDs given a list of names
27-
| NameSimilarityExample.java | Matches two names and produces a match score
28-
| NameTranslationExample.java | Translates a name
29-
| PingExample.java | Pings the Rosette API to check for availability
30-
| SemanticVectorsExample.java | Gets the text embedding
31-
| SentencesExample.java | Gets the sentences
32-
| SentimentExample.java | Gets the sentiment of a local file
33-
| SimilarTermsExample.java | Gets the list of similar terms
34-
| SyntaxDependenciesExample.java | Gets syntactical dependencies
35-
| TokenExample.java | Gets the tokens
36-
| TopicsExample.java | Gets topics
37-
| TransliterationExample.java | Gets transliteration
19+
20+
## Docker ##
21+
[Docker files](https://github.com/rosette-api/java/examples/docker)
22+
23+
### Summary
24+
To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*.
25+
26+
### Basic Usage
27+
Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .`
28+
29+
Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1`
30+
31+
To test against a specific source file, add `-e FILENAME=filename` before the `-v`.
32+
To test against an alternate url, add `-e ALT_URL=alternate_url`.
33+
34+
35+

0 commit comments

Comments
 (0)