You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by "Jim foo.bar" <ji...@gmail.com> on 2012/10/05 16:59:37 UTC
NER using perceptron instead of MaXent?
Hi all,
is it at all possible to train a name-finder using perceptron instead
of maxent? The documentation says that openNLP supports both but I can
only find examples for pos-tagging and nothing else (sentence detection
,NER, chunking etc etc)...
thanks in advance...
Jim
Re: NER using perceptron instead of MaXent?
Posted by "Jim foo.bar" <ji...@gmail.com>.
aaa ok found the class...I was looking at an older version of
NameFinderME which did not have that method...
as far as concurency is concerned I don't really mind...I am just trying
to compare the 2 models...
Jim
On 05/10/12 16:43, Jörn Kottmann wrote:
> The perceptron training can only use one thread and
> ignores the Threads parameter.
>
> Threads is currently only supported by maxent gis training.
>
> Jörn
>
> On 10/05/2012 05:20 PM, William Colen wrote:
>> Yes, you can. Just create a properties file like follows
>>
>> Threads=8
>> Iterations=100
>> Algorithm=PERCEPTRON
>> Cutoff=0
>>
>> and train passing the properties file in the argument -params
>>
>> Note that perceptron models benefit from cutoff 0. For Maxent models
>> usually you set something like 5. I usually try different values with
>> the
>> CV tool to find the best cutoff value.
>>
>> Regards
>> William
>>
>> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> is it at all possible to train a name-finder using perceptron
>>> instead of
>>> maxent? The documentation says that openNLP supports both but I can
>>> only
>>> find examples for pos-tagging and nothing else (sentence detection
>>> ,NER,
>>> chunking etc etc)...
>>>
>>> thanks in advance...
>>>
>>> Jim
>>>
>
Re: NER using perceptron instead of MaXent?
Posted by Jörn Kottmann <ko...@gmail.com>.
The perceptron training can only use one thread and
ignores the Threads parameter.
Threads is currently only supported by maxent gis training.
Jörn
On 10/05/2012 05:20 PM, William Colen wrote:
> Yes, you can. Just create a properties file like follows
>
> Threads=8
> Iterations=100
> Algorithm=PERCEPTRON
> Cutoff=0
>
> and train passing the properties file in the argument -params
>
> Note that perceptron models benefit from cutoff 0. For Maxent models
> usually you set something like 5. I usually try different values with the
> CV tool to find the best cutoff value.
>
> Regards
> William
>
> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com> wrote:
>
>> Hi all,
>>
>> is it at all possible to train a name-finder using perceptron instead of
>> maxent? The documentation says that openNLP supports both but I can only
>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>> chunking etc etc)...
>>
>> thanks in advance...
>>
>> Jim
>>
Re: NER using perceptron instead of MaXent?
Posted by Aliaksandr Autayeu <al...@autayeu.com>.
Jim, you might use command line tools source code as a hint as well ;)
Aliaksandr
On Fri, Oct 5, 2012 at 5:25 PM, Jim foo.bar <ji...@gmail.com> wrote:
> Hi William,
>
> First of all thanks for the prompt reply, however I am using the API not
> the cmd tool...
> where do I pass that properties file?
>
> Jim
>
>
>
> On 05/10/12 16:20, William Colen wrote:
>
>> Yes, you can. Just create a properties file like follows
>>
>> Threads=8
>> Iterations=100
>> Algorithm=PERCEPTRON
>> Cutoff=0
>>
>> and train passing the properties file in the argument -params
>>
>> Note that perceptron models benefit from cutoff 0. For Maxent models
>> usually you set something like 5. I usually try different values with the
>> CV tool to find the best cutoff value.
>>
>> Regards
>> William
>>
>> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com>
>> wrote:
>>
>> Hi all,
>>>
>>> is it at all possible to train a name-finder using perceptron instead of
>>> maxent? The documentation says that openNLP supports both but I can only
>>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>>> chunking etc etc)...
>>>
>>> thanks in advance...
>>>
>>> Jim
>>>
>>>
>
Re: NER using perceptron instead of MaXent?
Posted by "Jim foo.bar" <ji...@gmail.com>.
Ok cool thanks a lot :-)
Jim
On 05/10/12 16:31, William Colen wrote:
> Use the train method that gets a TrainingParameters.
>
> Check how to create it in TrainingParameters.defaultParams().
>
> On Fri, Oct 5, 2012 at 12:25 PM, Jim foo.bar <ji...@gmail.com> wrote:
>
>> Hi William,
>>
>> First of all thanks for the prompt reply, however I am using the API not
>> the cmd tool...
>> where do I pass that properties file?
>>
>> Jim
>>
>>
>>
>> On 05/10/12 16:20, William Colen wrote:
>>
>>> Yes, you can. Just create a properties file like follows
>>>
>>> Threads=8
>>> Iterations=100
>>> Algorithm=PERCEPTRON
>>> Cutoff=0
>>>
>>> and train passing the properties file in the argument -params
>>>
>>> Note that perceptron models benefit from cutoff 0. For Maxent models
>>> usually you set something like 5. I usually try different values with the
>>> CV tool to find the best cutoff value.
>>>
>>> Regards
>>> William
>>>
>>> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com>
>>> wrote:
>>>
>>> Hi all,
>>>> is it at all possible to train a name-finder using perceptron instead of
>>>> maxent? The documentation says that openNLP supports both but I can only
>>>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>>>> chunking etc etc)...
>>>>
>>>> thanks in advance...
>>>>
>>>> Jim
>>>>
>>>>
Re: NER using perceptron instead of MaXent?
Posted by "Jim foo.bar" <ji...@gmail.com>.
I'm sorry I can't see it! Which class should I be looking into?
I can only see 3 train methods in the NameFinderME...they basically take
the same args + |AdaptiveFeatureGenerator
<http://opennlp.sourceforge.net/api/opennlp/tools/util/featuregen/AdaptiveFeatureGenerator.html>,
||iterations, cutoff|...
None of the args is of type TrainingParameters. I s there another
NameFinder class somewhere?
Jim
On 05/10/12 16:31, William Colen wrote:
> Use the train method that gets a TrainingParameters.
>
> Check how to create it in TrainingParameters.defaultParams().
>
> On Fri, Oct 5, 2012 at 12:25 PM, Jim foo.bar <ji...@gmail.com> wrote:
>
>> Hi William,
>>
>> First of all thanks for the prompt reply, however I am using the API not
>> the cmd tool...
>> where do I pass that properties file?
>>
>> Jim
>>
>>
>>
>> On 05/10/12 16:20, William Colen wrote:
>>
>>> Yes, you can. Just create a properties file like follows
>>>
>>> Threads=8
>>> Iterations=100
>>> Algorithm=PERCEPTRON
>>> Cutoff=0
>>>
>>> and train passing the properties file in the argument -params
>>>
>>> Note that perceptron models benefit from cutoff 0. For Maxent models
>>> usually you set something like 5. I usually try different values with the
>>> CV tool to find the best cutoff value.
>>>
>>> Regards
>>> William
>>>
>>> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com>
>>> wrote:
>>>
>>> Hi all,
>>>> is it at all possible to train a name-finder using perceptron instead of
>>>> maxent? The documentation says that openNLP supports both but I can only
>>>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>>>> chunking etc etc)...
>>>>
>>>> thanks in advance...
>>>>
>>>> Jim
>>>>
>>>>
Re: NER using perceptron instead of MaXent?
Posted by William Colen <wi...@gmail.com>.
Use the train method that gets a TrainingParameters.
Check how to create it in TrainingParameters.defaultParams().
On Fri, Oct 5, 2012 at 12:25 PM, Jim foo.bar <ji...@gmail.com> wrote:
> Hi William,
>
> First of all thanks for the prompt reply, however I am using the API not
> the cmd tool...
> where do I pass that properties file?
>
> Jim
>
>
>
> On 05/10/12 16:20, William Colen wrote:
>
>> Yes, you can. Just create a properties file like follows
>>
>> Threads=8
>> Iterations=100
>> Algorithm=PERCEPTRON
>> Cutoff=0
>>
>> and train passing the properties file in the argument -params
>>
>> Note that perceptron models benefit from cutoff 0. For Maxent models
>> usually you set something like 5. I usually try different values with the
>> CV tool to find the best cutoff value.
>>
>> Regards
>> William
>>
>> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com>
>> wrote:
>>
>> Hi all,
>>>
>>> is it at all possible to train a name-finder using perceptron instead of
>>> maxent? The documentation says that openNLP supports both but I can only
>>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>>> chunking etc etc)...
>>>
>>> thanks in advance...
>>>
>>> Jim
>>>
>>>
>
Re: NER using perceptron instead of MaXent?
Posted by "Jim foo.bar" <ji...@gmail.com>.
Hi William,
First of all thanks for the prompt reply, however I am using the API not
the cmd tool...
where do I pass that properties file?
Jim
On 05/10/12 16:20, William Colen wrote:
> Yes, you can. Just create a properties file like follows
>
> Threads=8
> Iterations=100
> Algorithm=PERCEPTRON
> Cutoff=0
>
> and train passing the properties file in the argument -params
>
> Note that perceptron models benefit from cutoff 0. For Maxent models
> usually you set something like 5. I usually try different values with the
> CV tool to find the best cutoff value.
>
> Regards
> William
>
> On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com> wrote:
>
>> Hi all,
>>
>> is it at all possible to train a name-finder using perceptron instead of
>> maxent? The documentation says that openNLP supports both but I can only
>> find examples for pos-tagging and nothing else (sentence detection ,NER,
>> chunking etc etc)...
>>
>> thanks in advance...
>>
>> Jim
>>
Re: NER using perceptron instead of MaXent?
Posted by William Colen <wi...@gmail.com>.
Yes, you can. Just create a properties file like follows
Threads=8
Iterations=100
Algorithm=PERCEPTRON
Cutoff=0
and train passing the properties file in the argument -params
Note that perceptron models benefit from cutoff 0. For Maxent models
usually you set something like 5. I usually try different values with the
CV tool to find the best cutoff value.
Regards
William
On Fri, Oct 5, 2012 at 11:59 AM, Jim foo.bar <ji...@gmail.com> wrote:
> Hi all,
>
> is it at all possible to train a name-finder using perceptron instead of
> maxent? The documentation says that openNLP supports both but I can only
> find examples for pos-tagging and nothing else (sentence detection ,NER,
> chunking etc etc)...
>
> thanks in advance...
>
> Jim
>