package com.qiuguo.iot.base.enums;


/*
* 词性表
* 作者：吴林
* */
// 中文词性表
public enum ChinesePartSpeechEnum {

    v(0, "动词"),
    vd(0, "副动词"),
    vn(0, "名动词"),



    ng(1, "名语素"),
    nr(2, "人名"),//LAC PER
    PER(2, "人名"),
    ns(3, "地名"),
    nt(4, "机构团体"),
    ORG(4, "机构团体"),
    LOC(4, "机构团体"),
    nz(5, "其他专名"),
    n(6, "名词"),
    q(7, "量词"),

    b(8, "区别词"),
    c(9, "连接词"),
    dg(10, "副语素"),
    d(10, "副词"),
    e(11, "叹词"),
    f(12, "方位词"),
    g(13, "语素"),
    h(14, "前街成分"),//LAC t
    i(15, "成语"),//LAC vn
    j(16, "简称略语"),
    k(17, "后接成分"),
    l(18, "习惯用语"),
    m(19, "数词"),
    o(20, "拟声词"),
    p(21, "介词"),

    r(22, "代词"),
    s(23, "触动词"),
    tg(24, "时语素"),
    t(25, "时间词"),//LAC TIME
    TIME(25, "时间词"),//LAC TIME
    u(26, "助词"),
    vg(27, "动语素"),

    a(28, "形容词:包含 ad ag an"),
    ag(28, "形玉素"),
    ad(28, "副形词"),
    an(28, "名形词"),
    w(29, "标点符号"),
    x(30, "非语素词"),
    y(31, "语气词"),//LAC xc
    xc(31, "语气词"),//LAC xc
    z(32, "状态词"),
    un(33, "未知词"),
    zd(99, "自定义"),
    ;
     ChinesePartSpeechEnum(Integer c, String n){
        code = c;
        name = n;
    }
    private Integer code;
    private String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ChinesePartSpeechEnum getEnumWithCode(Integer c){
        for (ChinesePartSpeechEnum e:values()
        ) {
            if(e.getCode().compareTo(c) == 0){
                return e;
            }
        }
        return null;
    }
    public static ChinesePartSpeechEnum getEnumWithName(String name){

        for (ChinesePartSpeechEnum e:values()
        ) {
            if(e.getName().equals(name)){
                return e;
            }
        }
        return null;
    }
}
