Error isuue in (Step-by-step tutorial)

28 views
Skip to first unread message

Fawei Biralatei James

unread,
Aug 1, 2015, 6:05:42 AM8/1/15
to eop-users
Hello Gil,
 
Thanks for the information.
 
I have tried the step-by-step tutorial and it working fine but I tried to change the configuration file used in the model  "configFile = new File("/home/user_name/eop-resources-1.2.3/configuration-files/MaxEntClassificationEDA_Base+OpenNLP_EN.xml");" to use EditDistance with the corpus I developed. Yet I am encountering error with the EditDistance EDA in my code.
 
See highlighted portion where error is encountered.
try{
            @SuppressWarnings("rawtypes")
            EDABasic eda = null;
            eda = new EditDistanceEDA();
            eda.startTraining(config);
        } catch (Exception e){
            System.err.println("Failed to do the training: "+e.getMessage());
            System.exit(1);
        }
 
 I need an idea to resolve this problem.


Kind regards

Tae-Gil Noh

unread,
Aug 1, 2015, 11:49:47 AM8/1/15
to eop-users
(sigh) Eh, if you don't show me the error message, how can I be of help? :-)

I suspect two causes of error (even though I don't see the error message :-)).

1) need to include proper EditDistanceEDA.java class
2) by wrong configuration file. (To use EditDistanceEDA, you need to use a configuration file that is prepared for EditDistance EDA not MaxEntClassificationEDA)

Please consult the following Wiki page, and try to use EditDiatance EDA with proper (prepared) configuration first. (it shows all the configuration supported by EditDistanceEDA)
https://github.com/hltfbk/EOP-1.2.3/wiki/EditDistance



2015년 8월 1일 토요일 오후 12시 5분 42초 UTC+2, Fawei Biralatei James 님의 말:

Fawei Biralatei James

unread,
Aug 2, 2015, 7:04:47 PM8/2/15
to eop-users, bj.f...@gmail.com
Hello Gil,
 
Thanks for your quick response.
   
   I highlighted the error portion of the code snippet below for your understanding in the previous message.

   However, find attached the code. The underlined portion of the code is where I am having the error.
 
 
I have tried the step-by-step tutorial and it working fine but I tried to change the configuration file used in the model  "configFile = new File("/home/user_name/eop-resources-1.2.3/configuration-files/MaxEntClassificationEDA_Base+OpenNLP_EN.xml");" to use EditDistance with the corpus I developed. Yet I am encountering error with the EditDistance EDA in my code.
 
See HIGHLIGHTED portion where error is encountered.

try{
            @SuppressWarnings("rawtypes")
            EDABasic eda = null;
            eda = new EditDistanceEDA();
            eda.startTraining(config);
        } catch (Exception e){
            System.err.println("Failed to do the training: "+e.getMessage());
            System.exit(1);
        }
 
 Thanks for your assistance.


Kind regards
Editdistance code.odt

Roberto Ferrari

unread,
Aug 3, 2015, 3:12:33 AM8/3/15
to eop-...@googlegroups.com, bj.f...@gmail.com
Hello,

Could you report the import declaration section too?



--
You received this message because you are subscribed to the Google Groups "eop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eop-users+...@googlegroups.com.
To post to this group, send email to eop-...@googlegroups.com.
Visit this group at http://groups.google.com/group/eop-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/eop-users/2a91f45e-4cf2-405b-b396-387c49336783%40googlegroups.com.

Tae-Gil Noh

unread,
Aug 3, 2015, 4:05:26 AM8/3/15
to eop-users
I see that you have highlighted the "code part" that produced an error. But what is the error itself? Was it "unable to find the class"? or some EDAException? or which?

I cannot understand why do you post (incomplete) code?  Are you trying to ask us to copy your code, and compile the code, and check error for you?  That's not a good idea, and besides, the code isn't complete, and will produce errors (e.g. where's the import section?)

Why don't you just post the error message that you have encountered? :-( Just let us see the error message itself, that is much easier to understand what is going on.

Sincerely,
Gil
Message has been deleted

Fawei Biralatei James

unread,
Aug 3, 2015, 6:04:28 AM8/3/15
to eop-users, bj.f...@gmail.com

I am sorry for the inconvenience I have caused you for the improper presentation of my problem. However, attached here with the complete code, also see error report below.

ERROR REPORT:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    EditDistanceEDA cannot be resolved to a type

    at MyHello.annotatingSinglePair(MyHello.java:70)
    at MyHello.main(MyHello.java:187)


Kind regards

Fawei
Editdistance code.odt

Tae-Gil Noh

unread,
Aug 3, 2015, 6:28:07 AM8/3/15
to eop-users, bj.f...@gmail.com
You need to import EditDistanceEDA, to use EditDistanceEDA. such as;
import eu.excitementproject.eop.core.EditDistanceEDA;

The compiler produced the error, simply because it does not know where to look for the class. In Java, you need to import a class each time you want to use the class ...

I am sorry to add this; but you can't use EOP as library (as API), without knowing a bit about Java...
Maybe using it as external program (CLI usage example, of the tutorial) would be better, if that's really the case.


Sincerely,
Gil

Fawei Biralatei James

unread,
Aug 4, 2015, 8:44:18 AM8/4/15
to eop-users, bj.f...@gmail.com
Thanks, It is successful.
 
It is working now and I have got some results.

Kind regards

Fawei
Reply all
Reply to author
Forward
0 new messages