ECJ-INTEREST-L Archives

July 2013

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bojan Janisch <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Tue, 2 Jul 2013 00:11:16 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
Hi Sean,

I'll explain the background for better understanding:

As you might know until now I'm using ECJ in biomedical textmining context. ECJ creates rules which find a specific relation between multiple entities in text. Currently I'm setting the types of entities, a rule should use for a relation, hardcoded in my problem. But I want to extract all types and other specifications from the system so that I can reuse the core in other contexts, if I only change the types. 

So I want to parametrize the types and some other specification e.g. goldstandard folder for evaluation of the rule and so on. But ECJ only takes one parameter file which is given with the argument -file at start. So if I don't want to modify the Evolve class and add another parameter file, I need to add custom parameters to the params-file which ECJ takes. 

My problem was:
I didn't know how to get the ParameterDatabase which ECJ uses so that I can get the custom parameters e.g. relation = Operation or relation.types = Concept.

But you've shown me the solution. I didn't know that EvolutionState had already this database. So all I need to do is extract the specific parameters for my types and evaluation. I don't want to set them dynamically, I just need to load them at the setup of my problem.

I hope that explained my problem.

Greetings

Bojan


----- Ursprüngliche Mail -----
Von: "Sean Luke" <[log in to unmask]>
An: [log in to unmask]
Gesendet: Montag, 1. Juli 2013 22:44:07
Betreff: Re: Adding custom parameters

Bojan, I don't understand exactly what you're trying to do.  But it's very simple to add parameters dynamically to the parameter database, just use database.set(new Parameter("my-parameter"), "my-value")

It's exceedingly rare to need to do this though: in fact ECJ does it only once (for master-slave communication).  If you're thinking of setting parameters dynamically, you're almost certainly going down the wrong road.

Sean

On Jun 30, 2013, at 4:03 PM, Bojan Janisch wrote:

> I've search in the manual, but there was only a small part which describes the creation of parameters.
> Does someone got a simple example of how to get a specific parameter e.g. custom inputfolder at 
> evaluation of a GPTree?

ATOM RSS1 RSS2