Name Harmonisation
Again a post on data deduplication. In English, because it concerns British data. We downloaded all Commons debates from 1981 till 2001 from the Hansard archives, and put that in one big XML file, of size 365 Mb, and containing 50 Million words.
With a simple XPath command //speakers, we found all speakers: 327.019 speaches were made.
Good, but how many persons were speaking in that period? We did
bash-3.00$ myxpathx //member The_Official_Report_House_of_Commons_1981_to_2004.xml >speakers
bash-3.00$ cat speakers |sort|uniq >uniqspeakers
bash-3.00$ wc uniqspeakers
7846 32005 220520 uniqspeakers
bash-3.00$
and found 7846 unique speakers…. But are these really unique speakers, or just unique strings?
Challenge
Write a script that correctly deduplicates the attached data set. Also provide some way of evaluating the correctness of the script. It would be nice if the names are harmonised to a list with some authority. Wikipedia could be an example.
The uniqspeaker file is attached; this file contains for each speaker in uniqspeaker the number of speeches made. The speaker file (which can be used when trying co-reference trics) can be obtained from Maarten Marx. | lees verder…