You are redefining a constant word which has the same name as a parameter within your function
class func buildWordDefinition (word:String, language:Language, root:TBXMLElement) -> WordDefinition
{
// same name as the parameter here
let word = WordDefinition(word: word, language: language)
}