The difference between the two programs is in how the difference between two strings in the datafiles is determined. With a set of strings A containing among others the variants A' and A'' the difference between two elements is calculated as follows:
leven | giw | |
---|---|---|
diff(A', A') | 0 | n' / n |
diff(A', A'') | Levenshtein(A', A'') | 1 |
As you can see, the leven program differentiates in how much non-identical strings are different, while the giw program differentiates in how infrequent identical strings are.
You can use the giw program to analyse data files that consists of elements from distinct categories. You can also use leven to do this, if you encode each category as a distinct string of length 1. Note that giw is not just a convenient program to analyse categorical data encoded as strings longer than 1 character. The programs giw and leven have different outcomes.
You can not use giw to analyse data in which there are nearly no identical strings, such as a set of phonetic data. In that case, you have to use leven.