         }
     }
     
-    fileprivate func saveWordsInMemory(words: [LexisWord])
-    {
-        var memoryWords = memory.getAllWords()
-        
-        for word in words
-        {
-            if !memoryWords.contains(word)
-            {
-                memoryWords.append(word)
-            }
-        }
-        
-        try? memory.save(words: memoryWords)
-    }
 }
 
 

    
    private init()
    {
    }
    
    public func initialize()
    {
        guard !initialized else { return }
        
        if initializing
        {
            LOG.info("Already initializing. Blocking until done.")
            waitUntilInitialized()
            return
        }
        
        initializing = true
        
        LOG.debug("Initializing LexisDatabase")
        
        
        initializing = false
        initialized = true
    }

    public var anyWord: LexisWord
    {
        if let word = web.getAnyWord()
        {
            return word
        }
        else
        {
            loadPersisted()
            
            if let word = memory.getAnyWord()
            {
                return word
            }
            else
            {
                return LexisWord.emptyWord
            }
        }

//  Copyright © 2016 RedRoma, Inc. All rights reserved.
//

import Archeota
import AromaSwiftClient
import Foundation


/**
    This is the API to the Lexis Database of Latin Words.
