diff --git a/README.md b/README.md index 2ea80cc..ec093fb 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,11 @@ 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') @@ -76,7 +75,7 @@ client = RecastAI::Client.new(YOUR_TOKEN, 'en') *The language is a lowercase isocode.* -### Text Request +## Text Request text_request(text, options = {}) @@ -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 = {}) @@ -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 | | ------------- |:------:| :-------------------------| @@ -142,7 +141,7 @@ if response.intent == YOUR_EXPECTED_INTENT end ``` -#### Get the first sentence +### Get the first sentence | Method | Params | Return | | --------------- |:------:| :------------------| @@ -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 | | ---------- |:-------------:| :------------------------| @@ -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 | | ---------- |:-------------:| :------------------------| @@ -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 @@ -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 | | ---------- |:-------------:| :------------------------| @@ -212,7 +211,7 @@ sentence = response.sentence() location = sentence.get('location') ``` -#### Get all entities matching name +### Get all entities matching name | Method | Params | Return | | ---------- |:-------------:| :------------------------| @@ -226,7 +225,7 @@ sentence = response.sentence() locations = sentence.all('location') ``` -#### Getters +### Getters Each of the following methods corresponds to a Response attribute