You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
866 B
Java
44 lines
866 B
Java
package com.supervision.pdfqaserver.dto;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import lombok.Data;
|
|
|
|
@Data
|
|
public class TextTerm {
|
|
|
|
/**
|
|
* 词
|
|
*/
|
|
public String word;
|
|
|
|
/**
|
|
* 标签
|
|
*/
|
|
public String label;
|
|
|
|
private float[] embedding;
|
|
|
|
public String getLabelValue() {
|
|
if (StrUtil.equalsAny(label,"n","nl","nr","ns","nsf","nz")){
|
|
return word;
|
|
}
|
|
if (StrUtil.equals(label,"nt")){
|
|
return "机构";
|
|
}
|
|
if (StrUtil.equalsAny(label,"ntc","公司")){
|
|
return "公司";
|
|
}
|
|
if (StrUtil.equals(label,"ntcf")){
|
|
return "工厂";
|
|
}
|
|
if (StrUtil.equals(label,"nto")){
|
|
return "政府机构";
|
|
}
|
|
if (StrUtil.equals(label,"企业")){
|
|
return "企业";
|
|
}
|
|
return null;
|
|
|
|
}
|
|
}
|