      mykb.add_alias(alias=alias3, entities=["Q42"], probabilities=[0.9])
  
      print("kb size", len(mykb), mykb.get_size_entities(), mykb.get_size_aliases())
  
      print("candidates for", alias1)
      candidates1 = mykb.get_candidates(alias1)
      for candidate in candidates1:
          print(" candidate")
          print("  name", candidate.get_entity_name(mykb))
          print("  alias", candidate.get_alias_name(mykb))
          print("  prior_prob", candidate.prior_prob)
  
      print("candidates for", alias2)
      candidates2 = mykb.get_candidates(alias2)
      for candidate in candidates2:
          print(" candidate")
          print("  name", candidate.get_entity_name(mykb))
          print("  alias", candidate.get_alias_name(mykb))
          print("  prior_prob", candidate.prior_prob)
  
      print("candidates for", alias3)
      candidates3 = mykb.get_candidates(alias3)
      for candidate in candidates3:
          print(" candidate")
          print("  name", candidate.get_entity_name(mykb))
          print("  alias", candidate.get_alias_name(mykb))
          print("  prior_prob", candidate.prior_prob)
  
  
  def add_el():
      nlp = spacy.load('en_core_web_sm')
      print("pipes before:", nlp.pipe_names)
 
</s> remove         return [Candidate(entity_hash=self._entries[entry_index].entity_hash,
 </s> add         return [Candidate(kb=self,
                          entity_hash=self._entries[entry_index].entity_hash, </s> remove     def get_entity_name(self, KnowledgeBase kb):
        return kb.strings[self.entity_hash]
 </s> add     property kb_id_:
        """RETURNS (unicode): ID of this entity in the KB"""
        def __get__(self):
            return self.kb.strings[self.entity_hash]

    property kb_id:
        """RETURNS (uint64): hash of the entity's KB ID"""
        def __get__(self):
            return self.entity_hash

    property alias_:
        """RETURNS (unicode): ID of the original alias"""
        def __get__(self):
            return self.kb.strings[self.alias_hash] </s> remove     def __init__(self, entity_hash, alias_hash, prior_prob):
 </s> add     def __init__(self, KnowledgeBase kb, entity_hash, alias_hash, prior_prob):
        self.kb = kb
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
      mykb.add_alias(alias=alias3, entities=["Q42"], probabilities=[0.9])
  
      print("kb size", len(mykb), mykb.get_size_entities(), mykb.get_size_aliases())
  
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
    for alias in [alias1, alias2, alias3]:
        print()
        print("candidates for", alias)
        candidates = mykb.get_candidates(alias)
        for candidate in candidates:
            print(" candidate")
            print("  kb_id", candidate.kb_id)
            print("  kb_id_", candidate.kb_id_)
            print("  alias", candidate.alias)
            print("  alias_", candidate.alias_)
            print("  prior_prob", candidate.prior_prob)
  
  
  def add_el():
      nlp = spacy.load('en_core_web_sm')
      print("pipes before:", nlp.pipe_names)
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 property getters and keep track of KB internally 
spacy/sandbox_test_sofie/testing_el.py