private boolean hasConceptTopic(SurfaceElement surf) {
   Document doc = surf.getSentence().getDocument();
   LinkedHashSet<SemanticItem> sems = surf.getSemantics();
   if (sems == null) return false;
   for (SemanticItem sem : sems) {
     Ontology ont = sem.getOntology();
     if (doc.getTopics() != null && doc.getTopics().contains(ont)) return true;
   }
   return false;
 }
 private boolean hasStringTopic(SurfaceElement surf) {
   Document doc = surf.getSentence().getDocument();
   LinkedHashSet<SemanticItem> sems = surf.getSemantics();
   if (sems == null) return false;
   for (SemanticItem sem : sems) {
     if (sem instanceof Term == false) continue;
     Term term = (Term) sem;
     if (doc.getTopics() != null && doc.getTopics().contains(term.getText().toUpperCase()))
       return true;
   }
   return false;
 }