I have a question about compiling the java package.

Asked 2 years ago, Updated 2 years ago, 22 views

https://github.com/nearbydelta/KoreanAnalyzer

I'd like to use the program listed on the link above.

I'm not sure what I'm supposed to do when I'm asked to compile the project source code.Are you asking me to compile the entire folder

I'm a beginner, so I don't know how to use this after reading the instructions.ㅠ<

If you know Java well, please give me a kind answer

java

2022-09-22 16:47

1 Answers

You don't have to modify the KoreanAnalyzer source code or build the source code yourself unless the build itself is purposeful. Use the following jar file in the root directory of the repository.

KoreanAnalyzer-0.2.2.3-jar-with-dependencies.jar

Please note that I have made a simple sample of how the Korean Analyzer library works.

HelloWorld.java

import kr.kaist.ir.korean.data.TaggedSentence;
import kr.kaist.ir.korean.tagger.IntegratedTagger;
import kr.kaist.ir.korean.tagger.IntegratedTagger.ParseStructure;
import kr.kaist.ir.korean.tagger.Tagger;

public class HelloWorld {


    public static void main(String[] args) {
    Tagger tagger = null;
    try {
        tagger = new IntegratedTagger(ParseStructure.KKMA);
        TaggedSentence = tagger.analyzeSentence ("Korean morpheme analyzer").");
            System.out.println("s: " + s.toString());
    } } catch (Exception e) {
        e.printStackTrace();
    }   

    }

}

Compile

javac -cp ".:KoreanAnalyzer-0.2.2.3-jar-with-dependencies.jar"  HelloWorld.java

Run

java -cp ".:KoreanAnalyzer-0.2.2.3-jar-with-dependencies.jar"  HelloWorld

Results

Loading /dic/noun.dic
Prob Dic Loading!
38 loaded!
79405 loaded!
69734 loaded!
58700 loaded!
501514 loaded!
(Loading time : 1.26 secs!
Loading /dic/prob/lnpr_syllable_bi.dic
232562 values are loaded. (Loading time( 0.281 secs)
Loaded 3.452secs
Loading /dic/verb.dic
Loaded 0.655secs
Loading /dic/simple.dic
Loaded 0.191secs
Loading /dic/person.dic
Loaded 0.0secs
Loading /dic/kcc.dic
Loaded 0.019secs
Loading /dic/raw.dic
Loaded 0.014secs
Dictionary Loading Time::4.332 seconds
Loaded Item 365048
DO LOGGING!!
Loading /dic/prob/lnpr_syllable_uni_noun.dic
1852 values are loaded. (Loading time( 0.007 secs)
FILE: ./data/kE/dic_analyzed.txt
s: Korean = Korean (NNGN/ncn)
    [Skeletal structure]
     | Korean = Korean (NG/NG)
     | 
    [Reference]
     | Korean = Korean (NNGN/ncn)
     | 
Morpheme = Morpheme (NNGN/ncn)
    [Skeletal structure]
     | Morphology = Morphology (NNG/NG)
     | 
    [Reference]
     | Morpheme = Morpheme (NNGN/ncn)
     | 
It is an analyzer. = The analyzer (NNGN/ncn) is (VCP/VCP)bnida (EFN/EFN). (SF/SF)
    [Skeletal structure]
     | It's an analyzer.  = The analyzer (NNG/NNG) is (VCP/VCP)bnida (EFN/EFN). (SF/SF)
     | 
    [Reference]
     | It's an analyzer   = The analyzer (NNGN/ncn) is (VCP/jp) binida (EF/ef)
     | | .    = .(SF/sf)
     |

The example I created is command line-based, but using IDE such as Eclipse and Intel J makes this process easier.


2022-09-22 16:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.