# File lib/mizuho/id_map.rb, line 106
        def generate_associations(titles)
                @associations = {}

                # Associate exact matches.
                titles = titles.reject do |title|
                        if (entry = @entries[title]) && !entry.associated?
                                entry.associated = true
                                @associations[title] = entry.id
                                true
                        else
                                false
                        end
                end

                # For the remaining titles, associate with moved or similar-looking entry.
                titles.reject! do |title|
                        if entry = find_moved(title)
                                @entries.delete(entry.title)
                                @entries[title] = entry
                                entry.title = title
                                entry.associated = true
                                entry.fuzzy = false
                                @associations[title] = entry.id
                                true
                        else
                                false
                        end
                end

                # For the remaining titles, associate with similar-looking entry.
                titles.reject! do |title|
                        if entry = find_similar(title)
                                @entries.delete(entry.title)
                                @entries[title] = entry
                                entry.title = title
                                entry.associated = true
                                entry.fuzzy = true
                                @associations[title] = entry.id
                                true
                        else
                                false
                        end
                end

                # For the remaining titles, create new entries.
                titles.each do |title|
                        id = create_unique_id(title)
                        add(title, id, false, true)
                        @associations[title] = id
                end
        end