src/main/java/cn/hxh/files/config/Word.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package cn.hxh.files.config;
import lombok.Data;
import java.util.Objects;
/**
* 封装分词结果*/
@Data
public class Word implements Comparable {
// 词名
private String name;
// 词性
private String pos;
// 权重,用于词向量分析
private Float weight;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPos() {
return pos;
}
public void setPos(String pos) {
this.pos = pos;
}
public Float getWeight() {
return weight;
}
public void setWeight(Float weight) {
this.weight = weight;
}
public Word(String name, String pos) {
this.name = name;
this.pos = pos;
}
@Override
public int hashCode() {
return Objects.hashCode(this.name);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
后面还有 39 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
