'Loads the XML-file (with sentiment annotations) from the given path.
By default, Sentiment.path is lazily loaded.'

def load(self, path=None):

    if (not path):
        path = self._path
    if (not os.path.exists(path)):
        return
    (words, synsets, labels) = ({}, {}, {})
    xml = cElementTree.parse(path)
    xml = xml.getroot()
    for w in xml.findall(u'word'):
        if ((self._confidence is None) or (self._confidence <= float(w.attrib.get(u'confidence', 0.0)))):
            (w, pos, p, s, i, label, synset) = (w.attrib.get(u'form'), w.attrib.get(u'pos'), w.attrib.get(u'polarity', 0.0), w.attrib.get(u'subjectivity', 0.0), w.attrib.get(u'intensity', 1.0), w.attrib.get(u'label'), w.attrib.get(self._synset))
            psi = (float(p), float(s), float(i))
            if w:
                words.setdefault(w, {}).setdefault(pos, []).append(psi)
            if (w and label):
                labels[w] = label
            if synset:
                synsets.setdefault(synset, []).append(psi)
    self._language = xml.attrib.get(u'language', self._language)
    for w in words:
        words[w] = dict(((pos, [avg(each) for each in zip(*psi)]) for (pos, psi) in words[w].items()))
    for (w, pos) in list(words.items()):
        words[w][None] = [avg(each) for each in zip(*pos.values())]
    for (id, psi) in synsets.items():
        synsets[id] = [avg(each) for each in zip(*psi)]
    dict.update(self, words)
    dict.update(self.labeler, labels)
    dict.update(self._synsets, synsets)
