New artificial intelligence system can detect dementia