Adds a synonym for a node
346471
def add_synonym(self, syn):
        
        n = self.node(syn.class_id)
        if 'meta' not in n:
            n['meta'] = {}
        meta = n['meta']
        if 'synonyms' not in meta:
            meta['synonyms'] = []
        meta['synonyms'].append(syn.as_dict())
35662
def addNode(self, node):
        '''
        
        '''
        self.mybldgbuids[node.buid] = node
        self.allbldgbuids[node.buid] = (node, self.doneevent)
696210
def add(self, node):
        
        self.sons.append(node)
        node.parent = self
336503
def __addNode(self, name, cls):
        '''
        
        '''
        if name in self.nodes:
            raise Exception("A node by the name {} already exists.  Can't add a duplicate.".format(name))
        self.__nxgraph.add_node(name)
        self.__nxgraph.node[name]['label'] = name
        self.__nxgraph.node[name]['nodeobj'] = cls()
        self.__nxgraph.node[name]['type'] = cls.__name__
436325
def add_node(self, node_name, dataframe=False):
        
        if node_name is None:
            return None
        return self.add_nodes([node_name], dataframe=dataframe)
378540
function Node(grammar, ctorName, matchLength) {
  this.grammar = grammar;
  this.ctorName = ctorName;
  this.matchLength = matchLength;
}
1252440
def define(cls, name, parent=None, interleave=False):
        """"""
        node = cls("define", parent, interleave=interleave)
        node.occur = 0
        node.attr["name"] = name
        return node
729387
def alter(node, metadata):
    """"""
    if node is not None and metadata and 'node' in metadata:
        node.attrib.update(
            dict((k, str(v)) for k, v in metadata['node'].items())
        )
150322
function addNodeToGraph(node){

    gNodesDisplayed.push(node);
    g.addNode(node._id, node);


    if (contains(childrenNodes, node._id)){
        var parentNode = getNodeFromId(nodesToBeLinked[node._id].from);
        if (contains(gNodesDisplayed, parentNode)){
            addLinkToParent(node._id, parentNode._id);
        }
    }
}
670192
def __add_tokenization(self, tree):
        """"""
        for token_id in self.get_token_ids(tree):
            self.add_node(token_id, layers={self.ns})
            self.tokens.append(token_id)
1075402
def process_synonyms(self, entity: List[dict]) -> List[dict]:
        
        label = entity['label']
        for synonym in entity['synonyms']:
            # these are internal errors and users should never see them
            if 'literal' not in synonym:
                raise ValueError(f'Synonym not given a literal for label: {label}')
            elif len(synonym) > 1:
                raise ValueError(f'Too many keys in synonym for label: {label}')
        return entity
1185415
def add_atom(self, key, atom):
        """"""
        self.graph.add_node(key, atom=atom)
187403
def rename_node(self, prefix):
        
        node_map_dict = {}
        # map each node to its new name (e.g. "a1")
        for i in range(0, len(self.nodes)):
            node_map_dict[self.nodes[i]] = prefix + str(i)
        # update node name
        for i, v in enumerate(self.nodes):
            self.nodes[i] = node_map_dict[v]
        # update node name in relations
        for node_relations in self.relations:
            for i, l in enumerate(node_relations):
                node_relations[i][1] = node_map_dict[l[1]]
860362
def add_node(self, node):
        
        if _debug: Network._debug("add_node %r", node)

        self.nodes.append(node)
        node.lan = self

        # update the node name
        if not node.name:
            node.name = '%s:%s' % (self.name, node.address)
1183421
def add_node(self, node):
        """"""
        other_nodes = [n for n in self.nodes() if n.id != node.id]

        for n in other_nodes:
            if isinstance(n, Source):
                node.connect(direction="from", whom=n)
            else:
                node.connect(direction="both", whom=n)
650473
def visit_Name(self, node):
        
        if isinstance(node.ctx, (ast.Store, ast.Param)):
            self.result.add(node.id)
1018053
def add2node(self, othereplus, node):
        """"""
        node = node.upper()
        self.dt[node.upper()] = self.dt[node.upper()] + \
            othereplus.dt[node.upper()]