Package kr.ac.kaist.swrc.jhannanum.hannanum

Examples of kr.ac.kaist.swrc.jhannanum.hannanum.Workflow


        String chartMorphAnalyzerConf = "conf/plugin/MajorPlugin/MorphAnalyzer/ChartMorphAnalyzer.json";
        String hmmTaggerAnalyzerConf = "conf/plugin/MajorPlugin/PosTagger/HmmPosTagger.json";
        File wf = new File(WorkflowFactory.class.getProtectionDomain().getCodeSource().getLocation().getPath());
        String wfpath = wf.getParentFile().getPath();

        Workflow workflow = new Workflow(wfpath);
        workflow.appendPlainTextProcessor(new SentenceSegmentor(), null);
        workflow.appendPlainTextProcessor(new InformalSentenceFilter(), null);
        workflow.setMorphAnalyzer(new ChartMorphAnalyzer(), chartMorphAnalyzerConf);
        // TODO: Add workflow.setMorphUserDic(userDicFile);
        workflow.appendMorphemeProcessor(new UnknownProcessor(), null);

        switch (workflowFlag) {
            case WORKFLOW_HMM_POS_TAGGER_09:
                workflow.setPosTagger(new HMMTagger(), hmmTaggerAnalyzerConf);
                workflow.appendPosProcessor(new SimplePOSResult09(), null);
                break;
            case WORKFLOW_HMM_POS_TAGGER_22:
                workflow.setPosTagger(new HMMTagger(), hmmTaggerAnalyzerConf);
                workflow.appendPosProcessor(new SimplePOSResult22(), null);
                break;
            case WORKFLOW_MORPH_ANALYZER:
                break;
            case WORKFLOW_NOUN_EXTRACTOR:
                workflow.setPosTagger(new HMMTagger(), hmmTaggerAnalyzerConf);
                workflow.appendPosProcessor(new NounExtractor(), null);
                break;
        }
        return workflow;
    }
View Full Code Here

TOP

Related Classes of kr.ac.kaist.swrc.jhannanum.hannanum.Workflow

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.