'Return True if this ``DependencyGrammar`` contains a
``DependencyProduction`` mapping \'head\' to \'mod\'.
:param head: A head word.
:type head: str
:param mod: A mod word, to test as a modifier of \'head\'.
:type mod: str
:rtype: bool'

def contains(self, head, mod):

    for production in self._productions:
        for possibleMod in production._rhs:
            if ((production._lhs == head) and (possibleMod == mod)):
                return True
    return False
