lingtools.keylookup module

class lingtools.keylookup.KeyLookUp(lookup_obj)[source]

Bases: object

Wraps around the call for looking up a key in a dictionary and returning the associated value. Current implementation uses marisa_trie (http://marisa-trie.readthedocs.io/).

Parameters:lookup_obj – The trie object where the look up will be performed.
get(key, wildcards=False)[source]

Get the entry for key.

Parameters:
  • key – The key to lookup in the object
  • wildcards – Should wildcards (*) be considered? Default: False