Skip to content

Commit 4f82cc5

Browse files
authored
Merge pull request #74 from rosette-api/suppo-1256-readme
Suppo 1256 readme
2 parents 5292a27 + 192baea commit 4f82cc5

File tree

5 files changed

+132
-94
lines changed

5 files changed

+132
-94
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: node_js
2+
# https://nodejs.org/en/about/releases/#releases
23
node_js:
3-
- "6.15.1"
4-
- "7.10.1"
5-
- "8.14.0"
6-
- "9.11.2"
7-
- "10.14.1"
8-
- "11.4.0"
4+
- "8"
5+
- "9"
6+
- "10"
7+
- "11"
8+
- "12"
99
before_install:
1010
- npm install -g npm
1111
before_script:

DEVELOPER.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Binding Developer Info
2+
3+
#### Build and Release Instructions
4+
TBD
5+
Include notes on updating Travis test versions, keeping `package.json` fresh.
6+
Maybe some notes on updating dependency versions, linting, dependency vulnerabilities, etc.
7+
There appears to be some mixed whitespace that should be tidied up.
8+
9+
10+
#### Old Docker Info From Examples
11+
If we want to keep this, let's clean it up.
12+
13+
`runAll.sh` is testing a string instead of an http code.
14+
`runAl.sh` and `Dockerfile` may need to be consolidated with the other example scripts.
15+
16+
Here are the old instructions from examples/README.
17+
18+
##### Docker
19+
A Docker image for running the examples against the compiled source library is available on Docker Hub.
20+
21+
Command: `docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-nodejs`
22+
23+
Additional environment settings:
24+
`-e ALT_URL=<alternative URL>`
25+
`-e FILENAME=<single filename>`
26+
27+
##### Example using the Rosette API language detection endpoint
28+
```javascript
29+
var Api = require('rosette-api');
30+
31+
var api = new Api(API_KEY);
32+
var endpoint = "language";
33+
var content = "Por favor Señorita, says the man.";
34+
api.parameters.content = content;
35+
36+
api.rosette(endpoint, function(err, res){
37+
if(err){
38+
console.log(err);
39+
} else {
40+
console.log(JSON.stringify(res, null, 2));
41+
}
42+
});
43+
```

README.md

Lines changed: 37 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,37 @@
1-
[![Build Status](https://travis-ci.org/rosette-api/nodejs.svg?branch=develop)](https://travis-ci.org/rosette-api/nodejs) [![npm version](https://badge.fury.io/js/rosette-api.svg)](https://badge.fury.io/js/rosette-api)
2-
3-
# rosette-api
4-
5-
This is the Rosette API client binding for node.js.
6-
7-
## Getting Started
8-
Install the module with: `npm install rosette-api`
9-
10-
If the version you are using is not [the latest from npm](https://www.npmjs.com/package/rosette-api) (or `npm show rosette-api@* version`),
11-
please check for its [**compatibilty with api.rosette.com**](https://developer.rosette.com/features-and-functions?javascript).
12-
If you have an on-premise version of Rosette API server, please contact support for
13-
binding compatibility with your installation.
14-
15-
To check your installed version:
16-
17-
- `npm list rosette-api` for local installation
18-
- `npm list -g rosette-api` for global installation
19-
20-
https://www.npmjs.com/package/rosette-api
21-
22-
## Docker ##
23-
A Docker image for running the examples against the compiled source library is available on Docker Hub.
24-
25-
Command: `docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-nodejs`
26-
27-
Additional environment settings:
28-
`-e ALT_URL=<alternative URL>`
29-
`-e FILENAME=<single filename>`
30-
31-
32-
## Example using the Rosette API language detection endpoint
33-
```javascript
34-
var Api = require('rosette-api');
35-
36-
var api = new Api(API_KEY);
37-
var endpoint = "language";
38-
var content = "Por favor Señorita, says the man.";
39-
api.parameters.content = content;
40-
41-
api.rosette(endpoint, function(err, res){
42-
if(err){
43-
console.log(err);
44-
} else {
45-
console.log(JSON.stringify(res, null, 2));
46-
}
47-
});
48-
```
49-
## API Parameters
50-
| Parameter | Endpoint | Required
51-
| ------------- |------------- |-------------
52-
| content | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics, transliteration | Either content or contentUri required, transliteration requires content only |
53-
| contentUri | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics | Either content or contentUri required |
54-
| language | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics, name similarity | No |
55-
| documentFile | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics | No |
56-
| name1 | name similarity | Yes |
57-
| name2 | name similarity| Yes |
58-
| name | name translation | Yes |
59-
| names | name deduplication | Yes |
60-
| targetLanguage | name translation, transliteration (No) | Yes |
61-
| entityType | name translation | No |
62-
| sourceLanguageOfOrigin | name translation | No |
63-
| sourceLanguageOfUse | name translation | No |
64-
| sourceLanguage | transliteration | No |
65-
| sourceScript | name translation, transliteration | No |
66-
| targetScript | name translation, transliteration | No |
67-
| targetScheme | name translation | No |
68-
| options | relationships | No |
69-
| accuracyMode | relationships | Yes |
70-
| explain | sentiment | No |
71-
| morphology | morphology | Yes |
72-
73-
## Additional Examples
74-
See [examples](examples).
75-
76-
## API Documentation
77-
See [documentation](http://rosette-api.github.io/nodejs)
78-
79-
## Release Notes
80-
See [wiki](https://github.com/rosette-api/nodejs/wiki/Release-Notes)
81-
82-
## Additional Information
83-
See [Rosette API site](https://developer.rosette.com/)
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+
5+
[![Build Status](https://travis-ci.org/rosette-api/nodejs.svg?branch=develop)](https://travis-ci.org/rosette-api/nodejs)
6+
[![npm version](https://badge.fury.io/js/rosette-api.svg)](https://badge.fury.io/js/rosette-api)
7+
![node engine](https://img.shields.io/node/v/rosette-api.svg)
8+
9+
## Rosette API
10+
The Rosette Text Analytics Platform uses natural language processing, statistical modeling, and machine learning to
11+
analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable
12+
information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and
13+
comparing the similarity of names, categorizing and adding linguistic tags to text and more.
14+
15+
## Rosette API Access
16+
- Rosette Cloud [Sign Up](https://developer.rosette.com/signup)
17+
- Rosette Enterprise [Evaluation](https://www.rosette.com/product-eval/)
18+
19+
## Quick Start
20+
21+
#### Installation
22+
`npm install rosette-api`
23+
24+
#### Examples
25+
View small example programs for each Rosette endpoint in the [examples](https://github.com/rosette-api/nodejs/tree/develop/examples) directory.
26+
27+
#### Documentation & Support
28+
- [Binding API](https://rosette-api.github.io/nodejs/)
29+
- [Rosette Platform API](https://developer.rosette.com/features-and-functions)
30+
- [Binding Release Notes](https://github.com/rosette-api/nodejs/wiki/Release-Notes)
31+
- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes)
32+
- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?javascript#)
33+
- [Support](https://support.rosette.com)
34+
- [Binding License: Apache 2.0](https://github.com/rosette-api/nodejs/blob/develop/LICENSE.txt)
35+
36+
## Binding Developer Information
37+
If you are modifying the binding code, please refer to the [developer README](https://github.com/rosette-api/nodejs/blob/develop/DEVELOPER.md) file.

examples/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Endpoint Examples
2+
Each example file demonstrates one of the capabilities of the Rosette Platform.
3+
4+
Here are some methods for running the examples. Each example will also accept an optional `--url` parameter for
5+
overriding the default URL.
6+
7+
A note on prerequisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it.
8+
9+
#### Docker/Latest Release
10+
```
11+
git clone [email protected]:rosette-api/nodejs.git
12+
cd nodejs/examples
13+
docker run -it --entrypoint sh -v $(pwd):/examples node:12-alpine
14+
cd /examples
15+
npm install rosette-api argparse
16+
sed -i s',require("../lib/Api"),require("rosette-api"),' ping.js
17+
node ping.js --key $API_KEY
18+
```
19+
20+
#### Docker/Current Source
21+
```
22+
git clone [email protected]:rosette-api/nodejs.git
23+
cd nodejs
24+
docker run -it --entrypoint sh -v $(pwd):/source node:12-alpine
25+
cd /source
26+
npm install
27+
cd examples
28+
node ping.js --key $API_KEY
29+
```

package.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,31 @@
1212
"url": "git://github.com/rosette-api/nodejs.git"
1313
},
1414
"keywords": [
15-
"rosette",
16-
"basis",
15+
"categorization",
16+
"entity extraction",
17+
"language detection",
18+
"lemmatization",
19+
"morphology",
20+
"name deduplication",
21+
"name similarity",
22+
"name translation",
23+
"natural language processing",
1724
"nlp",
18-
"text analytics"
25+
"relationship extraction",
26+
"semantic similarity",
27+
"sentiment analysis",
28+
"syntactic dependencies",
29+
"text analytics",
30+
"tokenization",
31+
"transliteration"
1932
],
2033
"author": {
2134
"name": "Basis Technology Corp",
2235
"email": "[email protected]"
2336
},
2437
"license": "Apache-2.0",
2538
"engines": {
26-
"node": ">=0.12.0",
27-
"iojs": "*"
39+
"node": ">=8.0.0"
2840
},
2941
"bugs": {
3042
"url": "https://github.com/rosette-api/nodejs/issues"

0 commit comments

Comments
 (0)