Engine implements Closeable { public EngineParsers getParsers() { return parsers; } Engine(boolean loadModels); List<Person> processAuthorsHeader(String authorSequence); List<Person> processAuthorsCitation(String authorSequence); List<List<Person>> processAuthorsCitationLists(List<String> authorSequences); List<Affiliation> processAffiliation(String addressBlock); List<List<Affiliation>> processAffiliations(List<String> addressBlocks); List<org.grobid.core.data.Date> processDate(String dateBlock); BiblioItem processRawReference(String reference, int consolidate); List<BiblioItem> processRawReferences(List<String> references, int consolidate); List<BibDataSet> processReferences(File inputFile, int consolidate); String downloadPDF(String url, String dirName, String name); List<String> getAcceptedLanguages(); void addAcceptedLanguages(String lang); Language runLanguageId(String filePath, String ext); Language runLanguageId(String filePath); String processHeader(
        String inputFile,
        int consolidate,
        boolean includeRawAffiliations,
        BiblioItem result
    ); String processHeader(String inputFile, int consolidate, BiblioItem result); String processHeader(String inputFile, GrobidAnalysisConfig config, BiblioItem result); void createTrainingMonograph(File inputFile, String pathRaw, String pathTEI, int id); void createTrainingBlank(File inputFile, String pathRaw, String pathTEI, int id); void createTraining(File inputFile, String pathRaw, String pathTEI, int id); String fullTextToTEI(File inputFile,
                                GrobidAnalysisConfig config); Document fullTextToTEIDoc(File inputFile,
                                     GrobidAnalysisConfig config); Document fullTextToTEIDoc(DocumentSource documentSource,
                                     GrobidAnalysisConfig config); int batchCreateTraining(String directoryPath, String resultPath, int ind); int batchCreateTrainingMonograph(String directoryPath, String resultPath, int ind); int batchCreateTrainingBlank(String directoryPath, String resultPath, int ind); static String header2TEI(BiblioItem resHeader); static String header2BibTeX(BiblioItem resHeader); static String references2TEI2(String path, List<BibDataSet> resBib); static String references2TEI(String path, List<BibDataSet> resBib); String references2BibTeX(String path, List<BibDataSet> resBib); static String reference2TEI(String path, List<BibDataSet> resBib, int i); static String reference2BibTeX(String path, List<BibDataSet> resBib, int i); String processAllCitationsInPatent(String text, 
                                            List<BibDataSet> nplResults, 
                                            List<PatentItem> patentResults,
                                            int consolidateCitations, 
                                            boolean includeRawCitations); String processAllCitationsInXMLPatent(String xmlPath, List<BibDataSet> nplResults,
                                                 List<PatentItem> patentResults,
                                                 int consolidateCitations, 
                                                 boolean includeRawCitations); String processAllCitationsInPDFPatent(String pdfPath, List<BibDataSet> nplResults,
                                                 List<PatentItem> patentResults,
                                                 int consolidateCitations, 
                                                 boolean includeRawCitations); String annotateAllCitationsInPDFPatent(String pdfPath, 
                                                  int consolidateCitations, 
                                                  boolean includeRawCitations); void createTrainingPatentCitations(String pathXML, String resultPath); int batchCreateTrainingPatentcitations(String directoryPath, String resultPath); List<ChemicalEntity> extractChemicalEntities(String text); String getAbstract(Document doc); String printRefTitles(List<BibDataSet> resBib); @Override synchronized void close(); static void setCntManager(CntManager cntManager); static CntManager getCntManager(); EngineParsers getParsers(); static Engine getEngine(boolean preload);  }
@Test public void visualizeCitations() throws Exception { File f = new File("/Users/zholudev/Downloads/AS-432836994965504@1480207789262_content_1.pdf"); GrobidAnalysisConfig config = new GrobidAnalysisConfig.GrobidAnalysisConfigBuilder().generateTeiCoordinates(Lists.newArrayList("ref", "biblStruct")).build(); Document doc = engine.getParsers().getFullTextParser().processing(DocumentSource.fromPdf(f, -1, -1, false, true, true), config); PDDocument document = PDDocument.load(f); document = CitationsVisualizer.annotatePdfWithCitations(document, doc, Collections.<String>emptyList()); File out = new File("/tmp/citAnn.pdf"); document.save(out); if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) { Desktop.getDesktop().open(out); } }