Skip to content

Commit b9a007a

Browse files
authored
Merge pull request #149 from rosette-api/suppo-1256-readme
Suppo 1256 readme
2 parents 35faf9f + e2f5cb7 commit b9a007a

File tree

3 files changed

+76
-65
lines changed

3 files changed

+76
-65
lines changed

DEVELOPER.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Developer Notes
2+
3+
#### Building and Releasing
4+
To be updated..
5+
6+
7+
#### Internal Releasing
8+
TBD..
9+
10+
#### Old Stuff
11+
[Docker](examples/docker) bits for running examples. Maybe just remove?
12+
13+
A duplicate copy of the examples docker notes is below...
14+
15+
Docker files can be found [here](https://github.com/rosette-api/java/tree/master/examples/docker)
16+
17+
To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*.
18+
19+
Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .`
20+
21+
Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1`
22+
23+
To test against a specific source file, add `-e FILENAME=filename` before the `-v`.
24+
To test against an alternate url, add `-e ALT_URL=alternate_url`.
25+
26+
#### TODOs
27+
...
28+

README.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
<a href="https://www.rosette.com"><img src="https://s3.amazonaws.com/styleguide.basistech.com/logos/rosette-logo.png" width="181" height="47" /></a>
2+
3+
---
4+
15
[![Build Status](https://travis-ci.org/rosette-api/java.svg?branch=master)](https://travis-ci.org/rosette-api/java)
2-
[![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)
6+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding)
37

4-
# Java client binding for Rosette API #
8+
## Rosette API
9+
The Rosette Text Analytics Platform uses natural language processing, statistical modeling, and machine learning to
10+
analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable
11+
information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and
12+
comparing the similarity of names, categorizing and adding linguistic tags to text and more.
513

6-
## Installation ##
7-
If you use Maven, include this dependency in your `pom.xml`:
14+
## Rosette API Access
15+
- Rosette Cloud [Sign Up](https://developer.rosette.com/signup)
16+
- Rosette Enterprise [Evaluation](https://www.rosette.com/product-eval/)
817

18+
## Quick Start
19+
20+
#### Maven
921
```xml
1022
<dependency>
1123
<groupId>com.basistech.rosette</groupId>
@@ -14,35 +26,26 @@ If you use Maven, include this dependency in your `pom.xml`:
1426
</dependency>
1527
```
1628

17-
where `${rosette.api.java.binding.version}` is the [latest version available from Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.basistech.rosette%22%20AND%20a%3A%22rosette-api%22).
18-
19-
The version will change as new versions of the binding are released. Note that versions of the form `x.y.Nxx`, where `N` is greater than 100, are internal testing versions; do not use them without consultation with Basis Technology Corp.
20-
21-
If the version you are using is not the latest from Maven Central. Please check for its
22-
[**compatibilty with api.rosette.com**](https://developer.rosette.com/features-and-functions?java).
23-
If you have an on-premise version of Rosette API server, please contact support for binding
24-
compatibility with your installation.
25-
26-
The source code on the master branch is the current state of development; it is not recommended for general use.
27-
If you prefer to build from source, please use an appropriate release tag.
28-
29-
## Basic Usage ##
30-
To check out more examples, see [examples](examples/src/main/java/com/basistech/rosette/examples)
31-
32-
## API Documentation ##
33-
Check out the [documentation](http://rosette-api.github.io/java)
29+
Set `${rosette.api.java.binding.version}` in the `<properties>` block. The latest version available is displayed
30+
in the Maven Central badge at the top of this page.
3431

35-
## Release Notes
36-
See the [Wiki](https://github.com/rosette-api/java/wiki/Release-Notes).
32+
#### Test Releases
33+
Versions, of the form `x.y.z`, where `z` is greater than or equal to `100`, are internal testing versions. Do not use
34+
them without consultation with Basis Technology Corp.
3735

38-
## Docker ##
39-
A Docker image for running the examples against the compiled source library is available on Docker Hub.
36+
#### Examples
37+
View small example programs for each Rosette endpoint in the
38+
[examples](examples/src/main/java/com/basistech/rosette/examples) directory.
4039

41-
Command: `docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-java`
40+
#### Documentation & Support
41+
- [Binding API](https://rosette-api.github.io/java/)
42+
- [Rosette Platform API](https://developer.rosette.com/features-and-functions)
43+
- [Binding Release Notes](https://github.com/rosette-api/java/wiki/Release-Notes)
44+
- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes)
45+
- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?java#)
46+
- [Support](https://support.rosette.com)
47+
- [Binding License: Apache 2.0](LICENSE.txt)
4248

43-
Additional environment settings:
44-
`-e ALT_URL=<alternative URL>`
45-
`-e FILENAME=<single filename>`
49+
## Binding Developer Information
50+
If you are modifying the binding code, please refer to the [developer README](DEVELOPER.md) file.
4651

47-
## Additional Information ##
48-
For more, visit [Rosette API site](https://developer.rosette.com)
Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,17 @@
1-
Rosette API Java Examples
2-
=========================
1+
## Endpoint Examples
2+
Each example file demonstrates one of the capabilities of the Rosette Platform.
33

4-
Each example class can be run independently.
4+
Here are some methods for running the examples. Each example will also accept an optional `-Drosette.api.altUrl`
5+
parameter for overriding the default URL.
56

6-
If you use Maven, everything should have been setup and you can start running the examples using `mvn exec:java`.
7-
Otherwise you can compile and run these examples by hand:
7+
A note on prerequisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it.
88

9-
- make sure you have JRE 1.7+, verify by `java -version`
10-
- download <TODO: nexus url>
11-
- `cd src/main/java/com/basistech/rosette/examples`
12-
- `javac -cp .:<path-to-rosette-api-jar-file> *.java`
13-
- `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
9+
#### Running from Local Source
10+
11+
```
12+
git clone [email protected]:rosette-api/java.git
13+
cd java
14+
mvn compile
15+
cd examples
16+
mvn exec:java -Dexec.mainClass="com.basistech.rosette.examples.PingExample" -Drosette.api.key=$API_KEY
17+
```

0 commit comments

Comments
 (0)