FishingSlark
FishingSlark

Reputation: 115

Eclipse OpenNLP Java API

I was trying to use OpenNLP to analyze text content. But when I use the code:

InputStream is = new FileInputStream("en-sent.bin");

there are red wavy lines under FileInputStream. It says Type mismatch, cannot convert from FileInputStream to InputStream. I have imported some jar packages, but I still don't know how to fix it. Is that concerned with environmental variables issue?

Imports:

import org.omg.CORBA_2_3.portable.InputStream;
import java.io.FileInputStream;

Upvotes: 1

Views: 115

Answers (1)

J Atkin
J Atkin

Reputation: 3150

You have the wrong import. Delete the line import org.omg.CORBA_2_3.portable.InputStream; and replace with import java.io.InputStream;.

Upvotes: 1

Related Questions