Hi all, I was hoping someone here could help me with some code. What I am trying to achieve is the following:
I receive a atom feed back from a search, which contains hundreds of records, I am interested in grouping these records by the similarity of the title field of each record. So for example, say the titles are
Record 1 = "Black Acer 19" laptop, windows 7 and grey carry case"
Record 2 = "Black Acer 19" laptop, windows XP and grey carry case"
Record 3 = "Black Acer 19" laptop with windows 7 and grey carry case"
Record 4 = "White Acer 19" laptop, windows 7 and grey carry case"
Record 5 = "Black Acer 19" laptop, windows 7 and grey carry case"
Record 6 = "White Acer 19" laptop with windows 7 and grey carry case"
Record 7 = "Black Acer 19" laptop, windows 7 and grey carry case"
What I would like it to do is take the first record, and compare it to the rest, then take the second record and compare it to the rest, so what I would end up with is this:
Record 1: Similar records = 3,5,7
Record 2: Similar records = 0
Record 3: this has already been grouped so would not be processed
Record 4: Similar records = 6
Record 5: this has already been grouped so would not be processed
Record 6: this has already been grouped so would not be processed
Record 7: this has already been grouped so would not be processed
The end result is me being able to display a collapsed view of each item/record, which when opened show the other records with same/similar titles.
I hope thats clear, it could be that I am thinking about this problem in completely the wrong way, but I have not been able to code a solution.
Any help greatly appreciated.
Tab