Package org.snu.ids.ha.ma

Examples of org.snu.ids.ha.ma.MorphemeAnalyzer.leaveJustBest()


        System.setOut(new PrintStream(new OutputStream() { public void write(int b) {}}){});

        MorphemeAnalyzer ma = new MorphemeAnalyzer();
        List<MExpression> ret = ma.analyze(phrase);
        ret = ma.postProcess(ret);
        ret = ma.leaveJustBest(ret);
        List<Sentence> sentenceList = ma.divideToSentences(ret);
        return sentenceList;
    }

    public KeywordList extractNoun(String phrase) {
View Full Code Here


      timer.stop();
      timer.printMsg("Time");

      ret = ma.postProcess(ret);

      ret = ma.leaveJustBest(ret);

      List<Sentence> stl = ma.divideToSentences(ret);
      for( int i = 0; i < stl.size(); i++ ) {
        Sentence st = stl.get(i);
        System.out.println("=============================================  " + st.getSentence());
View Full Code Here

    string = "범죄로부터 아이들을 구하기 위해서는 먼저 폭력에 노출된 어린이들을 보호하는 것이 필요하다.";

    try {
      mel = ma.postProcess(ma.analyze(string));
      //System.out.println(mel);
      mel = ma.leaveJustBest(mel);
      List<Sentence> stl = ma.divideToSentences(mel);

      for( int i = 0, size = stl.size(); i < size; i++ ) {
        ParseTree tree = parser.parse(stl.get(i));
        StringBuffer sb = new StringBuffer();
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.