Take the compound term
sentence(np(noun(fred)),vp(verb(swims)))and construct a tree. Start by marking the root of the tree with the principal functor and draw as many arcs as the principle functor has arguments. For each of the arguments, repeat the above procedure.