public Sentence(String sentence,String tag){
  tokens=sentence.split("\\s+");
  lemmas=tokens;
  tags=tag.split("\\s+");
  if (tokens.length != tags.length) {
    throw new IllegalArgumentException("Lengths do not match!");
  }
  position=new int[tokens.length];
  for (int i=0; i < tokens.length; i++) {
    position[i]=i;
  }
}

public Sentence ( String sentence , String tag ) { tokens = sentence . split ( "\\s+" ) ; lemmas = tokens ; tags = tag . split ( "\\s+" ) ; if ( tokens . length != tags . length ) { throw new IllegalArgumentException ( "Lengths do not match!" ) ; } position = new int [ tokens . length ] ; for ( int i = 0 ; i < tokens . length ; i ++ ) { position [ i ] = i ; } }
constructs a sentence object from a plain space - delimited sentence , e . g . , " tom likes jerry . "
