Try the transtive closure dead loop fix by Zaknarfen as in https://github.com/Zaknarfen/dbpedia-spotlight/blob/ed8e1ad800949c7ae1b58fe6999e625c255f2373/index/src/main/scala/org/dbpedia/spotlight/util/ExtractCandidateMap.scala