ahh yes, so some trade offs were made, but I think they are mostly positive. We 
have been layering in some needed logic to bring the matching upto par, but 
those have been mainly centered out how best to index the patterns.

The heuristics are basically normalize the data as best as possible to allow 
for generic pattern matching. Right now this means stripping all whitespace, 
symbols, and regex and then doing whole word ngram matching. I would like to 
reintroduce whitespace and symbols, but there are some conflicts with regex. 
Next, choose the longest match and thats basically it. The SimpleBuilder is the 
lowest priority and all other builders are equal priority. I think everything 
left is fine tuning now.

https://svn.apache.org/repos/asf/incubator/devicemap/trunk/devicemapjava/src/main/java/org/apache/devicemap/client/DeviceMapClient.java



________________________________
 From: Bertrand Delacretaz <[email protected]>
To: [email protected] 
Sent: Wednesday, June 26, 2013 8:11 AM
Subject: Re: device map java client
 

On Wed, Jun 26, 2013 at 1:56 PM, Reza Naghibi <[email protected]> wrote:
> Do you know what heuristics drive the openddr module?...

Not precisely...what I mean is the numerous pattern-matching
expressions found in our openddr/java builders, so maybe heuristics is
not the right word.

The AndroidDeviceBuilder, for example, contains a number of hardcoded
regexps, IMO such things belong in a data file and not in code, and if
your new code doesn't need them at all it's even better.

-Bertrand

[1] 
https://svn.apache.org/repos/asf/incubator/devicemap/trunk/openddr/java/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java

Reply via email to