Package gate

Examples of gate.Document.toXml()


      if(directoryFile != null) {
        String out = "";
        if(getSavePreservingFormat()) {
          AnnotationSet as = newDoc.getAnnotations(annotationSetNames.get(0));
          out = newDoc.toXml(as,addFeaturesToPreservingFormat);
        } else {
          out = newDoc.toXml();
        }
        File outFile = new File(directoryFile, theName+copiedDocNameSuffix+".xml");
        PrintStream outStream;
View Full Code Here


        String out = "";
        if(getSavePreservingFormat()) {
          AnnotationSet as = newDoc.getAnnotations(annotationSetNames.get(0));
          out = newDoc.toXml(as,addFeaturesToPreservingFormat);
        } else {
          out = newDoc.toXml();
        }
        File outFile = new File(directoryFile, theName+copiedDocNameSuffix+".xml");
        PrintStream outStream;
        try {
          outStream = new PrintStream(outFile);
View Full Code Here

    int correct = differ.getCorrectMatches();
    int falsePositives = differ.getFalsePositivesStrict();
    int missing = differ.getMissing();
    System.out.println("Diff: correct="+correct+" false positives="+falsePositives+" missing="+missing);
    File outFile = new File(testingDir,"news1pre_procBE"+backendNr+".xml");
    FileUtils.writeStringToFile(outFile, doc.toXml(),"UTF-8");
    // the 33 false Positives come from duplicates that are introduced from several list files
    // and which are not removed by the ExtGaz
    // the 2 missing come from matches within hyphenated words (after a hyphen) which are
    // not found by ExtGaz because they occur inside a single Token (hyphens do not split up tokens)
    assertEquals(194,correct);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.