def extract_property_names(self):
    """Store names of properties in a dict."""
    print("storing property names...")
    start = time.time()
    self.property_names = collections.defaultdict(list)
    for frame in self.kb:
      if "id" in frame and frame.id.startswith("P"):
        self.property_names[frame.id].append(frame.name)
    print("found", str(len(self.property_names)), "properties")
    print("took", (time.time() - start), "sec")
Store names of properties in a dict.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py