pywurfl.algorithms.JaroWinkler

Package pywurfl :: Module algorithms :: Class JaroWinkler |
[hide private]
[frames] | no frames]

# Class JaroWinkler

source code

    object --+
             |
     Algorithm --+
                 |
                JaroWinkler

Jaro-Winkler Search Algorithm

Instance Methods | [hide private]
__init__(self, accuracy=1.0, weight=0.05) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
Device @raises pywurfl.DeviceNotFound |
__call__(self, ua, devices) Every pywurfl algorithm class must define a __call__ method. | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, accuracy=1.0, weight=0.05) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Parameters: `accuracy` (float) - The tolerance that the Jaro-Winkler algorithm will use to determine if a user agent matches 0.0 <= accuracy <= 1.0 `weight` (float) - The prefix weight is inverse value of common prefix length sufficient to consider the strings 'identical' (excerpt from the Levenshtein module documentation). Overrides: object.__init__

### __call__(self, ua, devices) (Call operator) | source code
Every pywurfl algorithm class must define a __call__ method. Parameters: `ua` (string) - The user agent `devices` (Devices) - The devices object to search Returns: Device @raises pywurfl.DeviceNotFound Overrides: Algorithm.__call__