Package de.tud.kom.stringmatching.gst.utils

Examples of de.tud.kom.stringmatching.gst.utils.XMLHighlighter


   
    String sourceText = docContainer.getElementAsStringFor(sourceId, DocumentContainer.MASTER);
    String derivedText = docContainer.getElementAsStringFor(derivedId, DocumentContainer.DERIVED);
 
    String text = new XMLHighlighter(new EEBOPreprocessing()).produceHighlightedText(sourceText, derivedText).trim();

    text = text.substring( text.indexOf('>') + 1, text.lastIndexOf('<') - 1);
   
    return text;
  }
View Full Code Here


    DocumentContainer docContainer = DocumentContainer.getInstance();
    String original = docContainer.getElementAsStringFor(id, DocumentContainer.MASTER);
   
    for(TCLink link : matches){
      String match = docContainer.getElementAsStringFor(link.getCurrentDerivedId(),DocumentContainer.DERIVED);
      String highlighted = new XMLHighlighter(new EEBOPreprocessing()).produceHighlightedText(match, original);
      List<TCNote> notes = DBManager.getInstance().getNotesFor(TCNote.TYPE_PARAGRAPH, link.getCurrentDerivedId());
      List<TCNote> linkNotes = DBManager.getInstance().getNotesFor(TCNote.TYPE_LINK, link.getCurrentDerivedId());
      notes.addAll(linkNotes);
      foundMatches.add(new Match(highlighted, link, notes));
    }
View Full Code Here

    List<TCLink> links = DBManager.getInstance().findMatchesFor(id);
   
    // set highligted text and determine, whether a proposal is already a match
    for(MatchProposal m : matches){
      // get hihglighted version of the text
      String highlighted = new XMLHighlighter(new EEBOPreprocessing()).produceHighlightedText(m.getText(), needle);
      m.setText(highlighted);
     
      //
      for(TCLink l : links)
        if(m.getId().equals(l.getCurrentDerivedId()))
View Full Code Here

TOP

Related Classes of de.tud.kom.stringmatching.gst.utils.XMLHighlighter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.