Package Gnumed :: Package pycommon :: Module gmMatchProvider :: Class cMatchProvider_FixedList
[frames] | no frames]

Class cMatchProvider_FixedList

source code

    object --+    
             |    
cMatchProvider --+
                 |
                cMatchProvider_FixedList

Match provider where all possible options can be held in a reasonably sized, pre-allocated list.

Instance Methods
 
__init__(self, aSeq=None)
aSeq must be a list of dicts.
source code
 
getMatchesByPhrase(self, aFragment)
Return matches for aFragment at start of phrases.
source code
 
getMatchesByWord(self, aFragment)
Return matches for aFragment at start of words inside phrases.
source code
 
getMatchesBySubstr(self, aFragment)
Return matches for aFragment as a true substring.
source code
 
getAllMatches(self)
Return all items.
source code
 
set_items(self, items)
items must be a list of dicts.
source code

Inherited from cMatchProvider: getMatches, get_match_by_data, setThresholds, set_context, unset_context

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from cMatchProvider: print_queries

Properties

Inherited from cMatchProvider: ignored_chars, word_separators

Inherited from object: __class__

Method Details

__init__(self, aSeq=None)
(Constructor)

source code 

aSeq must be a list of dicts. Each dict must have the keys (data, label, weight)

Overrides: object.__init__

getMatchesByPhrase(self, aFragment)

source code 

Return matches for aFragment at start of phrases.

Overrides: cMatchProvider.getMatchesByPhrase

getMatchesByWord(self, aFragment)

source code 

Return matches for aFragment at start of words inside phrases.

Overrides: cMatchProvider.getMatchesByWord

getMatchesBySubstr(self, aFragment)

source code 

Return matches for aFragment as a true substring.

Overrides: cMatchProvider.getMatchesBySubstr

getAllMatches(self)

source code 

Return all items.

Overrides: cMatchProvider.getAllMatches

set_items(self, items)

source code 

items must be a list of dicts. Each dict must have the keys (data, list_label, weight)