Detecting dementia from written and spoken language