You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Joern Kottmann (Created) (JIRA)" <ji...@apache.org> on 2011/10/31 10:52:32 UTC
[jira] [Created] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Add L-BFGS parameter estimation training to maxent
--------------------------------------------------
Key: OPENNLP-338
URL: https://issues.apache.org/jira/browse/OPENNLP-338
Project: OpenNLP
Issue Type: New Feature
Components: Maxent
Reporter: Joern Kottmann
Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437670#comment-13437670 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I fixed bugs in serializing and deserializing process
and now I am getting 80 percent of precision on PPA data set.
But still no improve in result of CONLL02 data set.
I think QNTrainer itself is ok. so I am tuning the internal parameters of trainer (mainly in LineSearch)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467772#comment-13467772 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
If you worked on this in the mean time just attach a patch to get the trunk code up to date. Anyway, if we cannot get this feature stable before we release we need to close this issue and open a new one for that.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434837#comment-13434837 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I am testing the TokenNameFinderEvaluator job in IDE. this time, no exception rises, just "sent" count in increasing.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120815-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468358#comment-13468358 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
Hi, thanks for putting in my code.
My current code is now avoiding underflow / overflow in calculating log
likelihood.
But still there's an issue about inappropriate dealing of sparsity (zero
count in feature) in data.
And I think that i don't have enough time to solve this problem right now.
I want to solve this after the current release. How do you think about this?
Thanks.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437671#comment-13437671 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
if you have a clue, please let me know.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: patch20120814-lbfgs.txt
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469415#comment-13469415 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Thanks, applied it.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: LogLikelihoodFunctionTest.patch, LogLikelihoodFunctionTest.patch.2, nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: (was: patch20120814-lbfgs.txt)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: patch20120814-lbfgs.txt
- added ObjectReader/Writer, BinaryReader/Writer class for QNModel.
- modified TrainUtil configurations for QNModel.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434086#comment-13434086 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
The trainer.params file has these two lines:
Algorithm=MAXENT_QN
Cutoff=0
You can train like this:
bin/opennlp TokenNameFinderTrainer -lang nl -data ./nl-per.train -params trainer.params -model qn-test.bin
And the evaluation can be started with this command:
bin/opennlp TokenNameFinderEvaluator -model qn-test.bin -data nl-per.testa -lang nl
To start the bin/opennlp script just go to the checked out opennlp-tools folder. Prior doing that you should re-compile the maxent module.
The attached CONLL02 files can only be used for research and therefore incompatible with the AL license.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468394#comment-13468394 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
It would be nice to get the underflow fix in, if you already have it or its not much work to submit this patch.
Please open a second issue to fix the remaining problems after the release.
On our build server the tests don't run trough:
https://builds.apache.org/job/OpenNLP/org.apache.opennlp$opennlp-maxent/384/console
Can you have a look there?
The errors we get are these.
Failed tests: testValueAtNonInitialPoint02(opennlp.maxent.quasinewton.LogLikelihoodFunctionTest): expected:<-2.85417E-9> but was:<-4.7316595086537586E-12>
testGradientAtInitialPoint(opennlp.maxent.quasinewton.LogLikelihoodFunctionTest): expected:<20.0> but was:<8.5>
I looked a bit into it but couldn't really figure out what is the problem. The test runs fine on my development machine.
The tests must be fixed or disabled for the release, so they don't fail the build.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434663#comment-13434663 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
Ok. I think I haven't tested my ModelReader/Writer thoroughly... I'll try again.
Thanks for the data set and the instructions.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434090#comment-13434090 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
If you run the train command you get an error in the model serializer, I suggest to train on the ppa data set, serialize the model and then load it again to ensure there are no runtime errors in this code path. Its also easier to debug in an IDE if it fails in a junit test.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: LogLikelihoodFunctionTest.patch.2
last failing test fixed.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: LogLikelihoodFunctionTest.patch, LogLikelihoodFunctionTest.patch.2, nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433941#comment-13433941 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I could find no use of Logging class. Can you tell me where the Logging class is applied?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joern Kottmann updated OPENNLP-338:
-----------------------------------
Fix Version/s: tools-1.5.3
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Fix For: tools-1.5.3
>
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: patch-lbfgs.txt
implemented initial version of l-bfgs trainer.
please review this.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452978#comment-13452978 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
We should soon make the next release, if we want to pull this patch in we could mark it as experimental until we solved all the remaining issues. Any opinions about that?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434036#comment-13434036 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
The cross validation on my data set finished.
The results indicate that there is something wrong:
Precision: 0.01720884112209321 (Should be around .8 to .9)
Recall: 0.22854715378079865
F-Measure: 0.03200761519469317
Anyway, lets move to a public data set like from CONLL,
then you can reproduce the results.
Do you need help/instructions for that? I can send you a converted CONLL file off-list,
then you do not need to do that yourself.
Do you think it can be solved by using different parameters than the defaults?
Changed my mind about the logging while testing the code.
We should solve it via this issue later:
https://issues.apache.org/jira/browse/OPENNLP-124
But lets change the verbose flag to true by default, then the users sees the iterations
the algorithm does and get some feedback. Maybe there is even more that could be printed
in the training loop. That is what the other trainers we have do.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467770#comment-13467770 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Sorry, that I did not get it committed before my vacation. Patch is now applied, but the algorithm name is flagged as experimental until all problems are sorted out.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: patch20120821-lbfgs
here is my latest code.
I tested it by following options.
Algorithm=MAXENT_QN
numOfUpdates=7
maxFctEval=300
Cutoff=0
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (OPENNLP-338) Add L-BFGS parameter
estimation training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434090#comment-13434090 ]
Joern Kottmann edited comment on OPENNLP-338 at 8/14/12 11:53 PM:
------------------------------------------------------------------
If you run the train command you get an error in the model serializer, I suggest to train on the ppa data set, serialize the model and then load it again to ensure there are no runtime errors in this code path. Its also easier to debug in an IDE if it fails in a junit test.
That is the exception I get:
Caused by: java.lang.NullPointerException
at opennlp.model.GenericModelWriter.persist(GenericModelWriter.java:91)
at opennlp.tools.util.model.ModelUtil.writeModel(ModelUtil.java:71)
at opennlp.tools.util.model.GenericModelSerializer.serialize(GenericModelSerializer.java:39)
at opennlp.tools.util.model.GenericModelSerializer.serialize(GenericModelSerializer.java:31)
at opennlp.tools.util.model.BaseModel.serialize(BaseModel.java:553)
at opennlp.tools.cmdline.CmdLineUtil.writeModel(CmdLineUtil.java:173)
at opennlp.tools.cmdline.namefind.TokenNameFinderTrainerTool.run(TokenNameFinderTrainerTool.java:193)
at opennlp.tools.cmdline.CLI.main(CLI.java:222)
... 6 more
was (Author: joern):
If you run the train command you get an error in the model serializer, I suggest to train on the ppa data set, serialize the model and then load it again to ensure there are no runtime errors in this code path. Its also easier to debug in an IDE if it fails in a junit test.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440600#comment-13440600 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
We can also ask for more help on the dev list for hlep, maybe someone knows whats the problem or finds it. What do you think? Would be really nice to get this working!
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Comment: was deleted
(was: I made modification in QNModel its excessive memory use,
and TrainUtil to create proper trainer object.
So I think that I solved the problem raises exceptions that you showed me.
I tested it, it built model file successfully, but in assessment phase, I got following exception.
Can you tell me what went wrong this time please?
C:\Users\Hyosup\Desktop\apache-opennlp-1.5.3-SNAPSHOT>bin\opennlp TokenNameFinde
rEvaluator -model qn-test.bin -data nl-per.testa -lang nl
Loading Token Name Finder model ... done (1.324s)
Exception in thread "main" java.lang.NullPointerException
at opennlp.tools.namefind.NameFinderME.find(NameFinderME.java:223)
at opennlp.tools.namefind.NameFinderME.find(NameFinderME.java:205)
at opennlp.tools.namefind.TokenNameFinderEvaluator.processSample(TokenNa
meFinderEvaluator.java:84)
at opennlp.tools.namefind.TokenNameFinderEvaluator.processSample(TokenNa
meFinderEvaluator.java:43)
at opennlp.tools.util.eval.Evaluator.evaluateSample(Evaluator.java:82)
at opennlp.tools.util.eval.Evaluator.evaluate(Evaluator.java:109)
at opennlp.tools.cmdline.namefind.TokenNameFinderEvaluatorTool.run(Token
NameFinderEvaluatorTool.java:92)
at opennlp.tools.cmdline.CLI.main(CLI.java:222))
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468528#comment-13468528 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
Ok. I will check the test on build server first.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434040#comment-13434040 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
I added you as a contributor in jira.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433985#comment-13433985 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Thanks for the update! I am testing currently with the name finder on some private data, but the model does not seem to converge. The loop in QNTrainer.trainModel just loops endlessly.
Do I just need to be more patient?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim closed OPENNLP-338.
-------------------------------
Resolution: Fixed
L-BFGS is added as an experimental feature.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: LogLikelihoodFunctionTest.patch, LogLikelihoodFunctionTest.patch.2, nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438538#comment-13438538 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
The best F-Measure on the conll data i could get was 0.05.
Here are the details:
Precision: 0.38461538461538464
Recall: 0.02844950213371266
F-Measure: 0.05298013245033113
In the QNModel the case that a feature does not has a param is much more frequent in the name finder than in the PPA data set I think. Another difference is that it uses beam search to look for a likely sequence. Maybe the SMOOTHING_VALUE needs to be adjusted. I changed it to 1 and used a cutoff of 5 instead for the test results above.
Is the smoothing needed? Should it be disabled?
Do we need to initialize the results array in QNModel.eval with some prior values, like we in the GISModel?
Should the CONVERGE_TOLERANCE in QNTrainer be lower?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434075#comment-13434075 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I think I need a test data set. Can You give me one?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Comment: was deleted
(was: I am testing the TokenNameFinderEvaluator job in IDE. this time, no exception rises, just "sent" count in increasing.)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joern Kottmann reassigned OPENNLP-338:
--------------------------------------
Assignee: Hyosup Shim
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433992#comment-13433992 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Yes, need to be more patient, now it went on :)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469136#comment-13469136 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I checked the failing tests in LogLikelihoodFunctionTest. It passed through in my machine, too.
actually, unit tests of LogLikelihoodFunction have a dependency on how data indexer maps features on "predLabels".
It seems that mappings for features on predLabels in Indexer class differ to each other (one in local machine and build server).
What do you think about this. these tests should be ignored temporarilly?
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469322#comment-13469322 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
The patch is now applied. I will trigger the build manually. Please have a look at our build server, or see the build status mail on the dev list.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: LogLikelihoodFunctionTest.patch, nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: patch20120815-lbfgs
I made modification in QNModel its excessive memory use,
and TrainUtil to create proper trainer object.
So I think that I solved the problem raises exceptions that you showed me.
I tested it, it built model file successfully, but in assessment phase, I got following exception.
Can you tell me what went wrong this time please?
C:\Users\Hyosup\Desktop\apache-opennlp-1.5.3-SNAPSHOT>bin\opennlp TokenNameFinde
rEvaluator -model qn-test.bin -data nl-per.testa -lang nl
Loading Token Name Finder model ... done (1.324s)
Exception in thread "main" java.lang.NullPointerException
at opennlp.tools.namefind.NameFinderME.find(NameFinderME.java:223)
at opennlp.tools.namefind.NameFinderME.find(NameFinderME.java:205)
at opennlp.tools.namefind.TokenNameFinderEvaluator.processSample(TokenNa
meFinderEvaluator.java:84)
at opennlp.tools.namefind.TokenNameFinderEvaluator.processSample(TokenNa
meFinderEvaluator.java:43)
at opennlp.tools.util.eval.Evaluator.evaluateSample(Evaluator.java:82)
at opennlp.tools.util.eval.Evaluator.evaluate(Evaluator.java:109)
at opennlp.tools.cmdline.namefind.TokenNameFinderEvaluatorTool.run(Token
NameFinderEvaluatorTool.java:92)
at opennlp.tools.cmdline.CLI.main(CLI.java:222)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120815-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joern Kottmann updated OPENNLP-338:
-----------------------------------
Attachment: nl-per.train
nl-per.testb
nl-per.testa
Dutch CONLL02 files in OpenNLP ner format.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440888#comment-13440888 ]
Hyosup Shim commented on OPENNLP-338:
-------------------------------------
I'm still working on it. In changing internal parameters, the best F1 mesasure I could get was around 0.30. (precision =: 0.20, recall =: 0.75)
It seems that minimizing loglikelihood doesn't make improvement in classified result.
But I can't tell which part of code is buggy yet.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: LogLikelihoodFunctionTest.patch
unit test dependency with DataIndexer removed
Please try with this patch applied.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: LogLikelihoodFunctionTest.patch, nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch20120821-lbfgs, patch-lbfgs.txt, precision_curve_on_iteration.png
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Hyosup Shim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyosup Shim updated OPENNLP-338:
--------------------------------
Attachment: (was: patch20120815-lbfgs)
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437718#comment-13437718 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Let me test again with the latest code.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Assignee: Hyosup Shim
> Fix For: tools-1.5.3
>
> Attachments: nl-per.testa, nl-per.testb, nl-per.train, patch20120814-lbfgs.txt, patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENNLP-338) Add L-BFGS parameter estimation
training to maxent
Posted by "Joern Kottmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432991#comment-13432991 ]
Joern Kottmann commented on OPENNLP-338:
----------------------------------------
Thanks for the patch, its really great to get L-BFGS support.
To be able to use it by OpenNLP Tools we are missing support for it in the TrainUtil class. That class abstracts the training process and gets a set of key/value pairs as input which select and configure the trainer, e.g. MAXENT and cutoff=5. It would probably be nice to make all important parameters for the training configurable here.
We need support to store and serialize the model. We probably need to store more/different parameters than with the Maxent GIS model.
Thers is a GenericModelReader, it first reads the type of the model and then delegates the parsing to the correct reader, should be easy to extend that.
The logging should be done with java.util.logging, then it is easy to turn it on/off when the trainer is used by the OpenNLP Tools without chaning any code.
> Add L-BFGS parameter estimation training to maxent
> --------------------------------------------------
>
> Key: OPENNLP-338
> URL: https://issues.apache.org/jira/browse/OPENNLP-338
> Project: OpenNLP
> Issue Type: New Feature
> Components: Maxent
> Reporter: Joern Kottmann
> Attachments: patch-lbfgs.txt
>
>
> Add support for the L-BFGS algorithm to train a maxent classifier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira