package ITUannotation;

import java.util.ArrayList;

public class ConllSentenceRelationFinder {
	ArrayList<ConllItem> cl;
	ArrayList<String[]> sentence;
	Integer wordcount=0;
	public ConllSentenceRelationFinder(ArrayList<String[]> sentence) {
		cl=new ArrayList<ConllItem>();
		this.sentence=sentence;
	}
	public ArrayList<ConllItem> getrelations() {
		int wordnum=0;
		int ignum=1;
		for(String[] columns:sentence){			
			if(columns[1].equals("_")){
				cl.add(new ConllItem(wordnum+1,ignum));
				ignum++;
			}
			else{
				wordnum++;
				cl.add(new ConllItem(wordnum,ignum));
				ignum=1;
			}
		}
		wordcount=wordnum;
		return cl;
	}
	public Integer getWordCount(){
		return wordcount;
	}
}
