package com.qiuguo.iot.third.nlp;

import com.qiuguo.iot.base.enums.ChinesePartSpeechEnum;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class NlpKey {
    private Integer type = 255;//此类型
    private String tagName;//此类型名称

    private String key;//分解出来的关键字
    private BigDecimal proportion;//所占比重（优先级）

    public void setTagName(String tag) {
        tagName = tag;
        ChinesePartSpeechEnum chinesePartSpeechEnum = ChinesePartSpeechEnum.valueOf(tag);
        if(chinesePartSpeechEnum != null){
            type = chinesePartSpeechEnum.getCode();
        }
    }
}
