This paper deals with a class of Prolog programs, called context-free term transformations (CFT). We present a polynomial time algorithm to identify a subclass of CFT, whose program consists of at most two clauses, from positive data; The algorithm uses 2-mmg (2minimal multiple generalization) algorithm, which is a natural extension of Plotkin's least generalization algorithm, to reconstruct the pair of heads of the unknown program. Using this algorithm, we show the consistent and conservative polynomial time identiability of the class of tree languages dened by CFTFBuniq together with tree languages dened by pairs of two tree patterns, both of which are proper subclasses of CFT, in the limit from positive data.