def matches(self, tokenJson):
        '''Determines whether given token (tokenJson) satisfies all the rules listed 
           in the WordTemplate. If the rules describe tokenJson[ANALYSIS], it is 
           required that at least one item in the list tokenJson[ANALYSIS] satisfies 
           all the rules (but it is not required that all the items should satisfy). 
           Returns a boolean value.
        
           Parameters
           ----------
           tokenJson: pyvabamorf's analysis of a single word token;
        '''
        if self.otherRules != None:
            otherMatches = []
            for field in self.otherRules:
                match = field in tokenJson and ((self.otherRules[field]).match(tokenJson[field]) != None)
                otherMatches.append( match )
            if not otherMatches or not all(otherMatches):
                return False
            elif self.analysisRules == None and all(otherMatches):
                return True
        if self.analysisRules != None:
            assert ANALYSIS in tokenJson, "No ANALYSIS found within token: "+str(tokenJson)
            totalMatches = []
            for analysis in tokenJson[ANALYSIS]:
                # Check whether this analysis satisfies all the rules 
                # (if not, discard the analysis)
                matches = []
                for field in self.analysisRules:
                    value = analysis[field] if field in analysis else ""
                    match = (self.analysisRules[field]).match(value) != None
                    matches.append( match )
                    if not match:
                        break
                totalMatches.append( all(matches) )
            #  Return True iff there was at least one analysis that 
            # satisfied all the rules;
            return any(totalMatches)
        return False