Loosely matching rhymes for chain code