  The Goulden-Jackson cluster method is a powerful tool for obtaining
generating functions for counting words in a free monoid by occurrences of a
set of subwords. We introduce a generalization of the cluster method for monoid
networks, which generalize the combinatorial framework of free monoids. As a
sample application of the generalized cluster method, we compute bivariate and
multivariate generating functions counting Motzkin paths---both with height
bounded and unbounded---by statistics corresponding to the number of
occurrences of various subwords, yielding both closed-form and continued
fraction formulae.
