Celebrity ages

Log in to Vote
5 Votes • 5 Comments
I think that when you type "how old is (celebrity name)" it should come up instantly with their age just like google. Please consider this :)
• posted 2 years and 11 months ago • type: Spice (API calls) On Hold

Nice suggestion. This could also go for people who aren't necessarily celebrities. If you can, I suggest you modify the title of your post to say "How old/how many kids does/etc. *name* have?"
posted by <hidden> • 2 years and 10 months ago Link
Wikipedia could be a good source for this. Anyone want to tackle this?
posted by javathunderman Community Leader2 years and 10 months ago Link
I have a basic working version of this. The main problem is, as far as I can tell Wikipedia doesn't provide any kind of structured biographical information via their API. So I am basically using a big ugly regex to try to parse a birthdate (and/or death date) from the "extract" field, and use that to calculate the age.

While this has worked for a fair amount of queries, it is far from full proof. In about a half hour of testing I came across at least 4 different patterns of listing the birth and end dates.

Any suggestions on a better way to handle this or perhaps a better source?

Some examples of what I am talking about:

- extract: "William Shakespeare (/ˈʃeɪkspɪər/; 26 April 1564 (baptised) – 23 April 1616)
- extract: "William Jefferson "Bill" Clinton (born William Jefferson Blythe III, August 19, 1946)
- extract: "James Marshall "Jimi" Hendrix (born Johnny Allen Hendrix; November 27, 1942 – September 18, 1970)
posted by <hidden> • 2 years and 10 months ago Link
After some more testing, I realized that a lot of my issues were coming from not correctly uppercasing the celebrity names when searching the wikipedia API. I seem to be getting results for most names.
posted by <hidden> • 2 years and 10 months ago Link
This is currently in development https://github.com/duckduckgo/zeroclicki...
posted by chrisjwilson Community Leader2 years and 10 months ago Link