Package test

Source Code of test.Test

package test;

import java.io.IOException;

import org.ansj.splitWord.analysis.CRFAnalysis;

import com.ansj.vec.Word2VEC;

public class Test {
    public static void main(String[] args) throws IOException {
        Word2VEC w1 = new Word2VEC() ;
        w1.loadGoogleModel("library/corpus.bin") ;
       
        System.out.println(w1.distance("奥尼尔"));
       
        System.out.println(w1.distance("毛泽东"));
       
        System.out.println(w1.distance("邓小平"));
       
       
        System.out.println(w1.distance("魔术队"));
       
        System.out.println(w1.distance("魔术"));
       
    }
}
TOP

Related Classes of test.Test

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.