Skip to content

Commit 60a9395

Browse files
Merge pull request #90 from rosette-api/suppo-1256-enduser-readme-clarity
SUPPO-1256: Focus the README on users.
2 parents 7b19e64 + 8397ffe commit 60a9395

File tree

3 files changed

+123
-97
lines changed

3 files changed

+123
-97
lines changed

DEVELOPER.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Developer Information
2+
3+
### Testing
4+
To test changes you have made to the binding, you can use a pre-configured Docker environment. This environment will:
5+
- Compile the binding within the container.
6+
- Install the binding within the container.
7+
- Execute one or more example files using the installed binding.
8+
- The example files can be executed against a Cloud release or an Enterprise release.
9+
- If a test suite exists, it will also be executed.
10+
11+
```
12+
git clone [email protected]:rosette-api/python.git
13+
cd python
14+
# Modify the binding...
15+
docker run -e API_KEY=$API_KEY -v $(pwd):/source rosetteapi/docker-python
16+
```
17+
18+
Optional parameters for the `docker run` execution are:
19+
20+
- `-e ALT_URL=<alternative URL>`
21+
- For testing against an Enterprise environment or the staging environment.
22+
- `-e FILENAME=<single filename>`
23+
- For testing a single example file instead of all the example files.
24+
25+
To alter the behavior of the pre-configured Docker environment, you can see the Dockerfile source and entry-point
26+
script [here](https://git.basistech.net/raas/rapid-development-tools/tree/master/binding-dockerfiles).
27+
28+
### Documentation Generation
29+
The existing README for documentation generation is [here](docs/README.md).
30+
The next time the API documentation is touched, please refresh the README and migrate it here.
31+
32+
### Examples README
33+
There's an old [Docker README](examples/docker) in the examples directory that might be a candidate for removal.
34+
35+
### Building A Release
36+
See the [instructions](https://git.basistech.net/raas/rapid-development-tools/tree/master/publish)
37+
38+
### TODOs
39+
- Inconsistent references with `rosette_api` and `rosette-api`
40+
- Doc generation README cleanup?
41+
- Example Docker file still needed?
42+
- `docker-compose.yaml` still needed?

README.md

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,38 @@
1-
[![Build Status](https://travis-ci.org/rosette-api/python.svg?branch=develop)](https://travis-ci.org/rosette-api/python) [![PyPI version](https://badge.fury.io/py/rosette-api.svg)](https://badge.fury.io/py/rosette-api) [![Python Versions](https://img.shields.io/pypi/pyversions/rosette-api.svg?color=dark%20green&label=Python%20Versions)](https://img.shields.io/pypi/pyversions/rosette-api.svg?color=dark%20green&label=Python%20Versions)
2-
3-
## This is the Python client binding for Rosette API.
4-
You can get an API Key and learn more [here](https://developer.rosette.com).
5-
For more detailed information check out our [features and functions page](https://developer.rosette.com/features-and-functions).
6-
7-
### Installation
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>
82

9-
The Python binding requires Python 2.7+ or 3.4+ and is available through pip:
3+
---
104

11-
`pip install rosette_api`
12-
13-
If the version you are using is not [the latest from PyPI](https://pypi.org/project/rosette_api/#history),
14-
please check for its [**compatibilty with api.rosette.com**](https://developer.rosette.com/features-and-functions?python).
15-
If you have an on-premise version of Rosette API server, please contact support for
16-
binding compatibility with your installation.
17-
18-
To check your installed version:
19-
20-
`pip show rosette_api`
21-
22-
### Basic Usage
5+
[![Build Status](https://travis-ci.org/rosette-api/python.svg?branch=develop)](https://travis-ci.org/rosette-api/python)
6+
[![PyPI version](https://badge.fury.io/py/rosette-api.svg)](https://badge.fury.io/py/rosette-api)
7+
[![Python Versions](https://img.shields.io/pypi/pyversions/rosette-api.svg?color=dark%20green&label=Python%20Versions)](https://img.shields.io/pypi/pyversions/rosette-api.svg?color=dark%20green&label=Python%20Versions)
238

24-
For help in how to call the various endpoints, please refer to the [examples](https://github.com/rosette-api/python/tree/develop/examples).
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.
2514

26-
### Supported Endpoints
27-
- categories
28-
- entities
29-
- info
30-
- language
31-
- morphology (complete, compound components, han readings, lemmas, parts of speech)
32-
- name deduplication
33-
- name similarity
34-
- name translation
35-
- ping
36-
- relationships
37-
- semantic similarity
38-
- semantic vectors
39-
- sentences
40-
- sentiment
41-
- syntax dependencies
42-
- tokens
43-
- topics
44-
- transliteration
15+
## Rosette API Access
16+
- Rosette Cloud [Sign Up](https://developer.rosette.com/signup)
17+
- Rosette Enterprise [Evaluation](https://www.rosette.com/product-eval/)
4518

46-
### API Documentation
47-
See [documentation](http://rosette-api.github.io/python)
19+
## Quick Start
4820

49-
### Release Notes
50-
See [wiki](https://github.com/rosette-api/python/wiki/Release-Notes)
51-
52-
### Docker
53-
A Docker image for running the examples against the compiled source library is available on Docker Hub.
54-
55-
Command: `docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-python`
56-
57-
Additional environment settings:
58-
- `-e ALT_URL=<alternative URL>`
59-
- `-e FILENAME=<single filename>`
21+
#### Installation
22+
`pip install rosette_api`
6023

24+
#### Examples
25+
View small example programs for each Rosette endpoint
26+
in the [examples](https://github.com/rosette-api/python/tree/develop/examples) directory.
27+
28+
#### Documentation & Support
29+
- [Binding API](https://rosette-api.github.io/python/)
30+
- [Rosette Platform API](https://developer.rosette.com/features-and-functions)
31+
- [Binding Release Notes](https://github.com/rosette-api/python/wiki/Release-Notes)
32+
- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes)
33+
- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?python#)
34+
- [Support](https://support.rosette.com)
35+
- [Binding License: Apache 2.0](https://github.com/rosette-api/python/blob/develop/LICENSE.txt)
36+
37+
## Binding Developer Information
38+
If you are modifying the binding code, please refer to the [developer README](https://github.com/rosette-api/python/tree/develop/DEVELOPER.md) file.

examples/README.md

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,50 @@
1-
Python Examples
2-
==================
3-
4-
These examples are scripts that can be run independently to demonstrate the Rosette API functionality.
5-
6-
Prerequisite: Either run `pip install rosette_api` or run `python setup.py install` in the python top level folder.
7-
8-
Alternatively, you can run all the examples with the command line:
9-
`find -maxdepth 1 -name "*.py" -exec tox -- {} --key api-key --url alternate_url \;`
10-
11-
You can now run your desired _endpoint_.py file to see it in action.
12-
For example, run `python/examples/categories.py` if you want to see the categories
13-
functionality demonstrated.
14-
15-
All files require you to input your Rosette API User Key after --key to run.
16-
For example: `python ping.py --key 1234567890`
17-
All also allow you to input your own service URL if desired.
18-
For example: `python ping.py --key 1234567890 --service_url http://www.myurl.com`
19-
Some (specified below) allow an additional input of either a file (.html or .txt) or a URL with `--file` or `--url`
20-
21-
Each example, when run, prints its output to the console.
22-
23-
| File Name | What it does |
24-
| ------------- |------------- |
25-
| categories.py | Gets the category of a document at a URL |
26-
| entities.py | Gets the entities from a piece of text |
27-
| info.py | Gets information about Rosette API |
28-
| language.py | Gets the language of a piece of text |
29-
| matched-name.py | Gets the similarity score of two names |
30-
| morphology_complete.py | Gets the complete morphological analysis of a piece of text|
31-
| morphology_compound-components.py | Gets the de-compounded words from a piece of text |
32-
| morphology_han-readings.py | Gets the Chinese words from a piece of text |
33-
| morphology_lemmas.py | Gets the lemmas of words from a piece of text |
34-
| morphology_parts-of-speech.py | Gets the part-of-speech tags for words in a piece of text |
35-
| name_deduplication.py | De-duplicates a list of names |
36-
| ping.py | Pings the Rosette API to check for reachability |
37-
| relationships.py | Gets the relationships between entities from a piece of text |
38-
| sentences.py | Gets the sentences from a piece of text |
39-
| sentiment.py | Gets the sentiment of a local file |
40-
| tokens.py | Gets the tokens (words) from a piece of text |
41-
| topics.py | Returns key phrases and concepts from provided content |
42-
| translated-name.py | Translates a name from one language to another |
43-
| transliteration.py | Transliterates the given text |
44-
1+
## Endpoint Examples
2+
3+
Each example file demonstrates one of the capabilities of the Rosette Platform.
4+
5+
Here are some methods for running the examples. Each example will also accept an optional `--url` parameter for
6+
overriding the default URL.
7+
8+
A note on pre-requisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it.
9+
10+
#### Virtualenv/Latest Release
11+
```
12+
git clone [email protected]:rosette-api/python.git
13+
cd python/examples
14+
virtualenv rosette_venv
15+
source rosette_venv/bin/activate
16+
pip install rosette_api
17+
python ping.py -k $API_KEY
18+
```
19+
20+
#### Virtualenv/Local Source
21+
```
22+
git clone [email protected]:rosette-api/python.git
23+
cd python
24+
virtualenv rosette_venv
25+
source rosette_venv/bin/activate
26+
python setup.py install
27+
cd examples
28+
python ping.py -k $API_KEY
29+
```
30+
31+
#### Docker/Latest Release
32+
```
33+
git clone [email protected]:rosette-api/python.git
34+
cd python/examples
35+
docker run -it -v $(pwd):/source --entrypoint bash python:3.6-slim
36+
cd /source
37+
pip install rosette_api
38+
python ping.py -k $API_KEY
39+
```
40+
41+
#### Docker/Local Source
42+
```
43+
git clone [email protected]:rosette-api/python.git
44+
cd python
45+
docker run -it -v $(pwd):/source --entrypoint bash python:3.6-slim
46+
cd /source
47+
python setup.py install
48+
cd examples
49+
python ping.py -k $API_KEY
50+
```

0 commit comments

Comments
 (0)