'Initialize the thesaurus.
:param root: root directory containing thesaurus LISP files
:type root: C{string}
:param badscore: the score to give to words which do not appear in each other\'s sets of synonyms
:type badscore: C{float}'

def __init__(self, root, badscore=0.0):

    super(LinThesaurusCorpusReader, self).__init__(root, 'sim[A-Z]\\.lsp')
    self._thesaurus = defaultdict(LinThesaurusCorpusReader.__defaultdict_factory)
    self._badscore = badscore
    for (path, encoding, fileid) in self.abspaths(include_encoding=True, include_fileid=True):
        with open(path) as lin_file:
            first = True
            for line in lin_file:
                line = line.strip()
                if first:
                    key = LinThesaurusCorpusReader._key_re.sub('\\1', line)
                    first = False
                elif (line == '))'):
                    first = True
                else:
                    split_line = line.split(' DCTB ')
                    if (len(split_line) == 2):
                        (ngram, score) = split_line
                        self._thesaurus[fileid][key][ngram.strip('"')] = float(score)
