Skip to content

Commit 5799479

Browse files
authored
Update README.md
1 parent 47a5460 commit 5799479

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,32 @@ Sometimes, it may be necessary to rename the value of the constants (According t
4040
const USER_ID = 'user_id'; //Foreign key
4141
```
4242
### Syntax Example
43-
Didactic demonstration of the algorithm
43+
A simple didactic demonstration of the algorithm
4444
```php
45-
$table = [
46-
['product_id' = 'A',
47-
'score' = 1,
48-
'user_id' = 'Pedro'
49-
],
50-
['product_id' = 'B',
51-
'score' = 1,
52-
'user_id' = 'Pedro'
53-
],
54-
['product_id' = 'A',
55-
'score' = 1,
56-
'user_id' = 'João'
57-
],
58-
['product_id' = 'B',
59-
'score' = 1,
60-
'user_id' = 'João'
61-
],
62-
['product_id' = 'C',
63-
'score' = 1,
64-
'user_id' = 'João'
65-
]
66-
];
67-
use Tigo\Recommend; // import
68-
$client = new Recommend();
69-
print_r($client->ranking($table,"Pedro"));
45+
$table = [
46+
['product_id'=> 'A',
47+
'score'=> 1,
48+
'user_id'=> 'Pedro'
49+
],
50+
['product_id'=> 'B',
51+
'score'=> 1,
52+
'user_id'=> 'Pedro'
53+
],
54+
['product_id'=> 'A',
55+
'score'=> 1,
56+
'user_id'=> 'João'
57+
],
58+
['product_id'=> 'B',
59+
'score'=> 1,
60+
'user_id'=> 'João'
61+
],
62+
['product_id'=> 'C',
63+
'score'=> 1,
64+
'user_id'=> 'João'
65+
]
66+
];
67+
use Tigo\Recommend; // import
68+
$client = new Recommend();
69+
print_r($client->ranking($table,"Pedro")); // result = ['C' => 2]
7070

7171
```

0 commit comments

Comments
 (0)