Package nltk :: Package wordnet :: Module cache
[hide private]
[frames] | no frames]

Module cache

source code

Classes [hide private]
  _LRUCache
A cache of values such that least recently used element is flushed when the cache fills.
  _NullCache
A NullCache implements the Cache interface (the interface that LRUCache implements), but doesn't store any values.
Functions [hide private]
 
disableCache()
Disable the entity cache.
source code
 
enableCache()
Enable the entity cache.
source code
 
clearCache()
Clear the entity cache.
source code
 
setCacheCapacity(capacity=1000)
Set the capacity of the entity cache.
source code
 
buildIndexFiles() source code
Variables [hide private]
  DEFAULT_CACHE_CAPACITY = 1000
  entityCache = _LRUCache(DEFAULT_CACHE_CAPACITY)
  abbreviations = 'adverb adv adv. r'
  pos = 'adv'
  token = 'r'
  tokens = ['adverb', 'adv', 'adv.', 'r']
Function Details [hide private]

setCacheCapacity(capacity=1000)

source code 

Set the capacity of the entity cache.

Parameters:
  • capacity (int) - new size of the cache.