'Args:
specfile: A filesystem path to a csv file containing language
definitions. It should have the format:
BaseObject,property,{class_property,class_function,instance_method,instance_property}'

def __init__(self, specfile):

    self.inverted_index = {}
    self.objects = set()
    with codecs.open(specfile, 'r', 'utf-8') as f:
        for line in f:
            line = line.strip()
            index = line.split('(')[0]
            if (index.count('.') > 1):
                index = index.split('prototype')[(-1)]
            index = index.split('.')[(-1)].lower().strip()
            if (index not in self.inverted_index):
                self.inverted_index[index] = []
            self.inverted_index[index].append(line)
            obj = line.split('.')[0]
            self.objects.add(obj)
