LZW algorithm is used to find patterns between input symbols. But can it seek pattern among words ? I mean the alfabet index not to be symbols but words for example for the input :
'abcd', 'abcd', 'fasf' , 'asda', 'abcd' , 'fasf' ...
to have an output like :
'abcd', '1', 'fasf' , 'asda' , '1', '2' ...
Or is there any compressing algorithm that does the trick ?