Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
[FIX] typo readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoudan authored Aug 19, 2016
1 parent a30c6f5 commit 0bcaf18
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,19 @@ The Client can be instanciated with a token and a language (both optional)
client = RecastAI::Client.new(YOUR_TOKEN, YOUR_LANGUAGE)
```

#### Your tokens

__Your tokens__

*Copy paste your request access token in your bot's settings*

#### Your language
__Your language__

```ruby
client = RecastAI::Client.new(YOUR_TOKEN, 'en')
```

*The language is a lowercase isocode.*

### Text Request
## Text Request

text_request(text, options = {})

Expand All @@ -99,7 +98,7 @@ __If a language is provided:__ the language you've given is used for processing

__If no language is provided:__ the language of the text is detected and is used for processing if your bot has expressions for it, else your bot's primary language is used for processing.

### File request
## File request

file_request(file, options = {})

Expand Down Expand Up @@ -128,7 +127,7 @@ __If no language is provided:__ your bot's primary language is used for processi

The Response is generated after a call to either file_request or text_request.

#### Get the first detected intent
### Get the first detected intent

| Method | Params | Return |
| ------------- |:------:| :-------------------------|
Expand All @@ -142,7 +141,7 @@ if response.intent == YOUR_EXPECTED_INTENT
end
```

#### Get the first sentence
### Get the first sentence

| Method | Params | Return |
| --------------- |:------:| :------------------|
Expand All @@ -154,7 +153,7 @@ response = client.text_request(YOUR_TEXT)
first_sentence = response.sentence
```

#### Get the first entity matching name
### Get the first entity matching name

| Method | Params | Return |
| ---------- |:-------------:| :------------------------|
Expand All @@ -166,7 +165,7 @@ response = client.text_request(YOUR_TEXT)
location = response.get('location')
```

#### Get all entities matching name
### Get all entities matching name

| Method | Params | Return |
| ---------- |:-------------:| :------------------------|
Expand All @@ -178,7 +177,7 @@ response = client.text_request(YOUR_TEXT)
locations = response.all('location')
```

#### Getters
### Getters

Each of the following methods corresponds to a Response attribute

Expand All @@ -198,7 +197,7 @@ Each of the following methods corresponds to a Response attribute

The Sentence is generated by the Recast.AI Response initializer

#### Get the first entity matching name
### Get the first entity matching name

| Method | Params | Return |
| ---------- |:-------------:| :------------------------|
Expand All @@ -212,7 +211,7 @@ sentence = response.sentence()
location = sentence.get('location')
```

#### Get all entities matching name
### Get all entities matching name

| Method | Params | Return |
| ---------- |:-------------:| :------------------------|
Expand All @@ -226,7 +225,7 @@ sentence = response.sentence()
locations = sentence.all('location')
```

#### Getters
### Getters

Each of the following methods corresponds to a Response attribute

Expand Down

0 comments on commit 0bcaf18

Please sign in to comment.