A Model for Learning the Semantics of Pictures