/** * Reads the specified sections from penn treebank * * @param treebankHome The directory that points to the merged (mrg) files of the WSJ portion */ public PennTreebankReader(String treebankHome, String[] sections, String parseViewName, String sourceFileExtension, String annotationFileExtension) throws Exception { super(CorpusReaderConfigurator.buildResourceManager(PENN_TREEBANK_WSJ, treebankHome, treebankHome, sourceFileExtension, annotationFileExtension)); this.parseViewName = parseViewName; combinedWSJHome = treebankHome; if (sections == null) this.sections = IOUtils.lsDirectories(combinedWSJHome); else { this.sections = new String[sections.length]; System.arraycopy(sections, 0, this.sections, 0, sections.length); } updateCurrentFiles(); }
/** * Reads the specified sections from penn treebank * * @param treebankHome The directory that points to the merged (mrg) files of the WSJ portion */ public PennTreebankReader(String treebankHome, String[] sections, String parseViewName, String sourceFileExtension, String annotationFileExtension) throws Exception { super(CorpusReaderConfigurator.buildResourceManager(PENN_TREEBANK_WSJ, treebankHome, treebankHome, sourceFileExtension, annotationFileExtension)); this.parseViewName = parseViewName; combinedWSJHome = treebankHome; if (sections == null) this.sections = IOUtils.lsDirectories(combinedWSJHome); else { this.sections = new String[sections.length]; System.arraycopy(sections, 0, this.sections, 0, sections.length); } updateCurrentFiles(); }
sections = IOUtils.lsDirectories(this.aceCorpusHome);
sections = IOUtils.lsDirectories(this.aceCorpusHome);
sections = IOUtils.lsDirectories(this.aceCorpusHome);