refactor language extraction for notes and labels