Computational linguistic grammar theory and its application to artificial intelligence