Re: Java implementations of RFC 4647 extended filtering

Jeremy J Carroll scripsit:

> The interface [1] that I have to implement gives me the language tag
> part of the RDF literal and asks me to return an analyzer, and my
> initial design is to use extended filtering: i.e. I will return an
> analyzer that is associated with a language range that matches the
> language tag. In the case of a tie I will take the longest.

This sounds like a use-case for lookup rather than filtering.  You use
filtering when (like Peter Falk in _Murder by Death_) you don't want to
miss anything:  if you read French, you will accept documents tagged
as generic French (fr), hexagonal French (fr-FR), or Canadian French
(fr-CA).  But your situation here is that if you have text tagged as
Canadian French, you will use the Canadian French analyzer if you have
one, otherwise the generic French analyzer.  That is precisely the
function of lookup.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
Andrew Watt on Microsoft:  Never in the field of human computing has so
much been paid by so many to so few! (pace Winston Churchill)

Received on Tuesday, 6 May 2014 17:22:30 UTC