how I deal with this ArrayIndexOutOfBoundException in this noun finding program
<p>I have came out with this problem that I couldn't find a way to solve this exception. Please do help.
My program is trying to find out nouns,verbs and adjectives from a user given sentence(Here I just tried to find out the nouns). If I had made errors in my program then please point those errors , so that I can correct it. 
Here is my code:</p>

<pre><code>enter code here

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Set;

import opennlp.tools.cmdline.parser.ParserTool;
import opennlp.tools.parser.Parse;
import opennlp.tools.parser.Parser;
import opennlp.tools.parser.ParserFactory;
import opennlp.tools.parser.ParserModel;
import opennlp.tools.util.ObjectStream;

public class ParserTest {

static Set&lt;String&gt; nounPhrases = new HashSet&lt;&gt;();
static Set&lt;String&gt; adjectivePhrases = new HashSet&lt;&gt;();
static Set&lt;String&gt; verbPhrases = new HashSet&lt;&gt;();
static String result;
gui_demo gd = new gui_demo();
String line = practice.gui_demo.textField1.getText();
public ParserTest(String line) {
    // TODO Auto-generated constructor stub
}


public ParserTest() {
    // TODO Auto-generated constructor stub
}

//ObjectStream&lt;String&gt; lineArr = new PlainTextByLineStream(new StringReader(line));

String[] lineArr = line.split("."); 
public void getNounPhrases(Parse p) {
    if (p.getType().equals("NN") || p.getType().equals("NNS") || p.getType().equals("NNP") || p.getType().equals("NNPS")) {
         nounPhrases.add(p.getCoveredText());
         System.out.println(p.getCoveredText());
    }

    if (p.getType().equals("JJ") || p.getType().equals("JJR") || p.getType().equals("JJS")) {
        adjectivePhrases.add(p.getCoveredText());
         System.out.println(p.getCoveredText());
    }

    if (p.getType().equals("VB") || p.getType().equals("VBP") || p.getType().equals("VBG")|| p.getType().equals("VBD") || p.getType().equals("VBN")) {
        verbPhrases.add(p.getCoveredText());
         System.out.println(p.getCoveredText());
    }

    for (Parse child : p.getChildren()) {
         getNounPhrases(child);
    }
}


public void parserAction() throws Exception {
    try{
    InputStream is = new FileInputStream("en-parser-chunking.bin");
    ParserModel model = new ParserModel(is);
    Parser parser = ParserFactory.create(model);
    for(int i=1; i &lt;= lineArr.length; i++){
    Parse topParses[] = ParserTool.parseLine(lineArr[i], parser , 1);      //getting Exception

    for (Parse p : topParses){
        //p.show();
        getNounPhrases(p);
    }
    }   
    }catch(Exception e){
        System.out.print(e);
    }
}
public static void main(String[] args) throws Exception {

    new ParserTest().parserAction();
    result = "Nouns :" +nounPhrases.toArray(new String[nounPhrases.size()]);//+ "\n" + "Verbs:" + verbPhrases + "Adjectives:" + adjectivePhrases;
    /*System.out.println("List of Noun Parse : "+nounPhrases);
    System.out.println("List of Adjective Parse : "+adjectivePhrases);
    System.out.println("List of Verb Parse : "+verbPhrases); */
    }

}
</code></pre>

<p>And the output of the program is:</p>

<blockquote>
  <blockquote>
    <p>java.lang.ArrayIndexOutOfBoundsException: 1</p>
  </blockquote>
</blockquote>