//
// Core Program for TETDM 
// KeywordData.java Version 0.11
// Copyright(C) 2011 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//


package source.TextData;


import java.io.*;

public class KeywordData
{
	public String word;	//End-form of a word
	
	public int partOfSpeech;					//Part of speech 1:Noun, 2:Verb, 3:Adjective, 4:Conjunction, 5:Adverb, 6:Interjection, 7:Particle, 8:Auxiliary verb		
	public int frequency;						//Frequency	
	public int frequencyInSegment[];			//Frequency in each segment	//	int seg_times[];	
	public int sentenceFrequencyInSegment[];	//Sentence frequency in each segment//	int seg_stimes[];			

	public int appearingSegment[];		//List of appeared segments	//maker.h//	int apseglist[];	
	public int appearingSegmentTable[];	//Appeared segments, 0:No appear, 1:appeared //, 2:appeared related to topic(After distance calculation) //maker.h//	int apseg[];	
	public int segmentFrequency;		//Number of appeared segments //maker.h//	int apsegnum;
	public int lastAppearingSegment;

	public int appearingSentence[];		//List of appeared sentences//    int apline[];	
	public int appearingSentenceTable[];//Appeared segments, 0:No appear, 1:appeared		
	public int sentenceFrequency;		//Sentence frequency	//    int apnum;
	public int lastAppearingSentence;

	public KeywordData(){}

	public void initializeTables(int segmentNum, int sentenceNum)
	{
		segmentFrequency = 0;
		sentenceFrequency = 0;
		lastAppearingSegment = -1;
		lastAppearingSentence = -1;
		
		appearingSentenceTable = new int[sentenceNum];
		appearingSentence = new int[sentenceNum];		
		for(int i=0;i<sentenceNum;i++)
		{
			appearingSentenceTable[i] = 0;
			appearingSentence[i] = -1;
		}
		
		appearingSegmentTable = new int[segmentNum];
		appearingSegment = new int[segmentNum];
		frequencyInSegment = new int[segmentNum];
		sentenceFrequencyInSegment = new int[segmentNum];
		for(int i=0;i<segmentNum;i++)
		{
			appearingSegmentTable[i] = 0;
			appearingSegment[i] = -1;
			frequencyInSegment[i] = 0;
			sentenceFrequencyInSegment[i] = 0;
		}		
	}
}

//	int first_seg;		//First appeared segment //maker.h
//	int subject;	//Frequency as a Subject(Nominative)
//	int subject_sn;	//Segment Frequency as a Subject

//		subject = 0;
//		subject_sn = 0;
