def valid_slot_obj(self, obj, quals):
    """Do these object and qualifiers satisfy numeric or date conditions."""
    if not FLAGS.keep_only_numeric_slots and not FLAGS.keep_only_date_slots:
      return True
    elif FLAGS.keep_only_numeric_slots:
      if isinstance(obj, numbers.Number):
        return True
      for _, qval in quals:
        if isinstance(qval, numbers.Number):
          return True
    else:
      if isinstance(obj, numbers.Number):
        if self.parse_date(str(obj)) is not None:
          return True
      for _, qval in quals:
        if isinstance(qval, numbers.Number):
          if self.parse_date(str(qval)) is not None:
            return True
    return False
Do these object and qualifiers satisfy numeric or date conditions.
language/templama/sling2facts.py