package com.lantone.qc.kernel.structure.ai.model;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName
 * @Description 实体信息
 * @Author fyeman
 * @Date
 * @Version 1.0
 **/
@Getter
@Setter
public class Lemma {
    private int id;
    private String text;
    private String position;
    private int from;
    private int to;
    private int len;
    private String property;
    private String relationName;
    private Lemma parent;
    private boolean haveChildren = false;
    private List<Lemma> relationLemmas = new ArrayList<>();

    public void addRelationLemmas(Lemma lemma) {
        this.relationLemmas.add(lemma);
        this.haveChildren = true;
    }
}
