A Model of Unsupervised Formal Learning for Natural Language