How to use the brickschema.brickschema.inference.HaystackInferenceSession function in brickschema

To help you get started, we’ve selected a few brickschema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BrickSchema / Brick / brickschema / brickschema / inference.py View on Github external
def __init__(self, namespace):
        """
        Creates a new HaystackInferenceSession that infers entities into
        the given namespace

        Args:
            namespace (str): namespace into which the inferred Brick entities
                             are deposited. Should be a valid URI
        """
        super(HaystackInferenceSession, self).__init__()
        self._BLDG = Namespace(namespace)
        self._tagmap = {
            'cmd': 'command',
            'sp': 'setpoint',
            'temp': 'temperature',
            'lights': 'lighting',
            'rtu': 'RTU',
            'ahu': 'AHU',
            'freq': 'frequency',
            'equip': 'equipment',
        }
        self._filters = [
                lambda x: not x.startswith('his'),
                lambda x: not x.endswith('Ref'),
                lambda x: not x.startswith('cur'),
                lambda x: x != ('disMacro'),