⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 segnode.java

📁 ictclas java实现 很不错的 包含全部所需的文件包 能对句子进行详细的词法分析.
💻 JAVA
字号:
package com.gftech.ictclas4j.bean;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

/**
 * 分词图表中的节点,实际表示图中的一条边
 * 
 * @author sinboy
 * 
 */
public class SegNode {
	private int col;//表示边的后驱,即终点

	private int row;//表示边的前驱,即起点

	private double value;//权值

	private int pos;//词性

	private int len;//边的内容的长度

	private String word;//边的内容

	public SegNode() {

	}

	public SegNode(int row, int col,  double value,int pos, String word) {
		this.row=row;
		this.col=col;
		this.value=value;
		this.pos=pos;
		this.word=word;
		if(word!=null)
			this.len=word.getBytes().length;
	}

	public int getCol() {
		return col;
	}

	public void setCol(int col) {
		this.col = col;
	}

	public int getLen() {
		return len;
	}

	public void setLen(int len) {
		this.len = len;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	public String getWord() {
		return word;
	}

	public void setWord(String word) {
		this.word = word;
		if(word!=null)
			this.len=word.getBytes().length;
	}

	public String toString() {

		return ReflectionToStringBuilder.toString(this);

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -