[uf-discuss] vcard fn for name in "A. B. Smith" format

Drew McLellan lists at allinthehead.com
Wed Aug 30 11:45:05 PDT 2006


On 30 Aug 2006, at 13:29, Graham Higgins wrote:

> On 29 Aug 2006, at 15:42, Brian S wrote:
>
>> you shouldn't make assumptions about what the 'A.' and 'B.'  
>> mean... i did in my example (otherwise it would have been a pretty  
>> boring reply).
>
>
>> There is a service which attempts at guessing the N structure.[1]  
>> It isn't perfect, but does fairly well.
>> [1] - http://tools.microformatic.com/help/xhtml/best-guess/
>
> Sorry, I'm having a little difficulty reading between the lines, is  
> this another troll along the lines of the first one?
>
> Because,
>
> http://tools.microformatic.com/query/xhtml/best-guess/Rt+Hon+Lord 
> +Ashdown+KBE
>
> is parsed as:
>
>> <span class="n">
>> 	<span class="given-name">Rt</span>
>> 	<span class="additional-name">Hon</span>
>> 	<span class="additional-name">Lord</span>
>> 	<span class="additional-name">Ashdown</span>
>> 	<span class="family-name">KBE</span>
>> </span>
>
> It's tempting to respond with a facetious: "<bong> thank you for  
> playing, next contestant please".
>
> But if I did that, I suspect that I'd be missing some subtle point.  
> Are you perhaps prompting us to conjecture that a successful parse  
> is impossible without a rich set of semantics?

You're right in that best-guess isn't currently picking up multiple
honourary prefixes and suffixes. As soon as I see any real quantity of
real-life names of such a pattern come through the service, then yes,
I'll add that support. At the moment it seems so edge-case that it's
not worth the effort.

Additionally, the list of prefixes and suffixes I'm matching against
isn't fully comprehensive. I clearly don't have KBE in the list. I
shall add it.

Ultimately, best-guess is attempting to do just that - make the best
guess it can with the information available. It's never going to be
perfect, it'll probably never work well for non-western names, but it
should always return something that can be used as a *valid* value for
'fn', even if that value isn't 100% accurate. However, the rate of
accuracy is pretty good, so it's up to you to weigh up whether to use
its guesses, process all your names by hand or omit hCards entirely for
your individual set of data.

drew



More information about the microformats-discuss mailing list