... | ... | @@ -86,33 +86,54 @@ aabbababbaabbbabbabaaababababababab |
|
|
|
|
|
```
|
|
|
$ salza -s -i x
|
|
|
1.069050e+01
|
|
|
9.853782e+00
|
|
|
```
|
|
|
|
|
|
### ... is the same as computing the relative similarity given no prior:
|
|
|
|
|
|
```
|
|
|
$ salza -s -t relative -i x
|
|
|
1.069050e+01
|
|
|
9.853782e+00
|
|
|
```
|
|
|
|
|
|
### which is the same as computing the joint similarity of a string alone:
|
|
|
|
|
|
```
|
|
|
$ salza -s -t joint -i x
|
|
|
1.069050e+01
|
|
|
9.853782e+00
|
|
|
```
|
|
|
|
|
|
### The joint similarity of a string with copies of itself is the same as that of the string alone:
|
|
|
```
|
|
|
$ salza -s -t joint -i x,x
|
|
|
1.069050e+01
|
|
|
$ salza -s -t joint -i x,x,x
|
|
|
1.069050e+01
|
|
|
9.853782e+00
|
|
|
```
|
|
|
|
|
|
### The relative similarity of a string given itself is zero:
|
|
|
### But this is not the case for concatenation:
|
|
|
```
|
|
|
$ cat x x | salza -s -i -
|
|
|
1.084182e+01
|
|
|
```
|
|
|
As the intuition suggests, more concatenations only slightly increase the complexity:
|
|
|
```
|
|
|
$ cat x x x | salza -s -i -
|
|
|
1.089478e+01
|
|
|
$ cat x x x x | salza -s -i -
|
|
|
1.092117e+01
|
|
|
$ cat x x x x x | salza -s -i -
|
|
|
1.093698e+01
|
|
|
```
|
|
|
|
|
|
### Zeros of `salza`
|
|
|
|
|
|
The empty string has similarity zero:
|
|
|
```
|
|
|
$ echo -n "" | salza -s -i -
|
|
|
0.000000e+00
|
|
|
$ echo -n "" | salza -s -i - -p x
|
|
|
0.000000e+00
|
|
|
```
|
|
|
The relative similarity of a string given itself is zero:
|
|
|
```
|
|
|
$ salza -s -i x -p x
|
|
|
0.000000e+00
|
... | ... | |