Skip to content

Commit

Permalink
Distance is the sum, not the max of distance values between words (#2511
Browse files Browse the repository at this point in the history
)
  • Loading branch information
123batman authored Jul 31, 2023
1 parent 74f43ca commit ee16744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion learn/inner_workings/datatypes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To demonstrate how a string is split by space, let's say you have the following
"Bruce Willis,Vin Diesel"
```

In the example above, the distance between `Bruce` and `Willis` is equal to **1**. The distance between `Vin` and `Diesel` is also **1**. However, the distance between `Bruce` and `Vin` is equal to **8**. The same goes for `Bruce` and `Diesel`, or `Willis` and `Vin`, or also `Willis` and `Diesel`.
In the example above, the distance between `Bruce` and `Willis` is equal to **1**. The distance between `Vin` and `Diesel` is also **1**. However, the distance between `Willis` and `Vin` is equal to **8**. The same calculations apply to `Bruce` and `Diesel` (10), `Bruce` and `Vin` (9), and `Willis` and `Diesel` (9).

Let's see another example. Given two documents:

Expand Down

0 comments on commit ee16744

Please sign in to comment.