Return-Path: X-Original-To: apmail-opennlp-dev-archive@www.apache.org Delivered-To: apmail-opennlp-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1353AFBE9 for ; Fri, 22 Mar 2013 14:45:19 +0000 (UTC) Received: (qmail 8196 invoked by uid 500); 22 Mar 2013 14:45:18 -0000 Delivered-To: apmail-opennlp-dev-archive@opennlp.apache.org Received: (qmail 8162 invoked by uid 500); 22 Mar 2013 14:45:18 -0000 Mailing-List: contact dev-help@opennlp.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@opennlp.apache.org Delivered-To: mailing list dev@opennlp.apache.org Received: (qmail 8154 invoked by uid 99); 22 Mar 2013 14:45:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 14:45:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasonbaldridge@gmail.com designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-ee0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 14:45:14 +0000 Received: by mail-ee0-f45.google.com with SMTP id b57so2361832eek.32 for ; Fri, 22 Mar 2013 07:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:reply-to:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MtuX+9IbSA9aujScycR96g+DV/CC6DV/ZVUjqnSIGDY=; b=nxjga8xtwQJJH15HJmX7rs0cv0ruSRNCrSgqZ4R6cIOQrczAqzXvGl55uPYVme4NcX SEpOjggtXUP3uhTngTHtnQnFPDEYmWP+STaaSC0nTWOFFECDjMoOIVdgearOHLXcYuWw dlBlwbN56GrgAAhcAzfEoCVRc3uMoyXu0KunUPnhRtc3uDzn7HyxiB+bs+bJ6RFxaOEY 0r2mPTTy1NNmL7Wy61eugUIbvSIXDTjrazkN8gTZq7t3Gi3+RIXzWQJXexuEtkNhQtDS FXx5zbLp6C1YiH6Q0D9YxSEr3Y43hTGoEqiMqhI8+XO9csTzAdxFeaUbm7fEcu66LpGj qG2w== MIME-Version: 1.0 X-Received: by 10.14.210.8 with SMTP id t8mr5728772eeo.35.1363963492964; Fri, 22 Mar 2013 07:44:52 -0700 (PDT) Received: by 10.14.132.140 with HTTP; Fri, 22 Mar 2013 07:44:52 -0700 (PDT) Reply-To: jasonbaldridge@gmail.com In-Reply-To: <514C6B8D.8030209@gmail.com> References: <514C4363.7060906@gmail.com> <514C57CF.4040205@gmail.com> <514C6B8D.8030209@gmail.com> Date: Fri, 22 Mar 2013 09:44:52 -0500 Message-ID: Subject: Re: Liblinear (was: OpenNLP 1.5.3 RC 2 ready for testing) From: Jason Baldridge To: dev@opennlp.apache.org Content-Type: multipart/alternative; boundary=047d7b603fe27c4d8904d8847fa0 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b603fe27c4d8904d8847fa0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I used the Java port. I actually pulled it into nak as nak.liblinear because the model write/read code did it as text files and I needed access to the Model member fields in order to do the serialization how I wanted. Otherwise it remains as is. With a little bit of adaptation, you could provide a Java wrapper in OpenNLP that follows the same pattern as my Scala stuff. You'd just need to make it implement AbstractModel, which shouldn't be too hard. (I have it implement LinearModel, which is just a slight modification of MaxentModel, and I changed all uses of AbstractModel to LinearModel in Chalk [the opennlp.tools portion]). -j On Fri, Mar 22, 2013 at 9:32 AM, J=F6rn Kottmann wrote= : > Sounds interesting, I hope we will find the time to do that in OpenNLP > after the 1.5.3 release too. We already discussed this and I think had > consensus > on making the machine learning pluggable and then offer a few addons for > existing libraries. > > Good to know that liblinear works well, as far as I know its written in > C/C++, > did you use the Java port of it, or did you wrote a JNI interface? > > J=F6rn > > On 03/22/2013 03:08 PM, Jason Baldridge wrote: > >> BTW, I've just recently finished integrating Liblinear into Nak (which i= s >> an adaptation of the maxent portion of OpenNLP). I'm still rounding some >> things out, but so far it is producing more accurate models that are >> trained in less time and without using cutoffs. Here's the code: >> https://github.com/scalanlp/**nak >> >> It is still mostly Java, but the liblinear adaptors are in Scala. I've >> kept >> things such that liblinear retrofits to the interfaces that were in >> opennlp.maxent, though given how well it is working, I'll be stripping >> those out and going with liblinear for everything in upcoming versions. >> >> Happy to answer any questions or help out with any of the above if it >> might >> be useful! >> > > --=20 Jason Baldridge Associate Professor, Department of Linguistics The University of Texas at Austin http://www.jasonbaldridge.com http://twitter.com/jasonbaldridge --047d7b603fe27c4d8904d8847fa0--