Return-Path: X-Original-To: apmail-incubator-opennlp-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-opennlp-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 329D07253 for ; Thu, 1 Dec 2011 18:03:38 +0000 (UTC) Received: (qmail 66718 invoked by uid 500); 1 Dec 2011 18:03:38 -0000 Delivered-To: apmail-incubator-opennlp-dev-archive@incubator.apache.org Received: (qmail 66633 invoked by uid 500); 1 Dec 2011 18:03:38 -0000 Mailing-List: contact opennlp-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: opennlp-dev@incubator.apache.org Delivered-To: mailing list opennlp-dev@incubator.apache.org Received: (qmail 66625 invoked by uid 99); 1 Dec 2011 18:03:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 18:03:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kottmann@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bw0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 18:03:30 +0000 Received: by bkbzv15 with SMTP id zv15so2002671bkb.6 for ; Thu, 01 Dec 2011 10:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=rpWlR/qFJdeTeARNunu7Uapk3uPUkVhg27XEUG4pSmQ=; b=OoRkxySRhU62vLvgRZAr8+7ranP+KRCYm2OzmmyiO6sQWmBAC1/1/UGqfsL/p5HWIA Ab3fcog0NfNqjXpPD30zpTFc+NxKJOVOLPwhrG5BMMKGFF1MHkDyxTe6BTOAMBfrO7O4 +XQtstWRqmPRROmDkBlccEhJF15D3v1fk2xqs= Received: by 10.205.143.18 with SMTP id jk18mr8424321bkc.1.1322762588750; Thu, 01 Dec 2011 10:03:08 -0800 (PST) Received: from karkand.local (x1-6-00-1b-c0-b0-b1-21.k707.webspeed.dk. [83.94.228.124]) by mx.google.com with ESMTPS id p13sm12943651bkd.4.2011.12.01.10.03.06 (version=SSLv3 cipher=OTHER); Thu, 01 Dec 2011 10:03:07 -0800 (PST) Message-ID: <4ED7C159.3050002@gmail.com> Date: Thu, 01 Dec 2011 19:03:05 +0100 From: =?UTF-8?B?SsO2cm4gS290dG1hbm4=?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: opennlp-dev@incubator.apache.org Subject: Re: proposal to move CLI tools into separate jar References: <4ECCE0BE.7020406@gmail.com> <4ECCF5D4.9010303@gmail.com> <4ECD0833.1080104@gmail.com> <4ECD1653.9030201@gmail.com> <4ECD58A2.4010302@gmail.com> <4ECDC543.1090705@gmail.com> <4ECE43CA.6060206@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/1/11 6:32 PM, Aliaksandr Autayeu wrote: >> Do you have a sample here? As far as I know we almost don't have >> dependencies >> on the CLI package from other classes, expect for the formats package. >> > Yes. POSTaggerCrossValidator.java > > import opennlp.tools.cmdline.CmdLineUtil; > import opennlp.tools.cmdline.TerminateToolException; > > Why it does that? To throw a TerminateToolException it does not need to > throw anyway. If it is easy to make a dependency, they will creep in. Nice that you fixed that one :) >> Having three separate jar files (maxent, tools, cli) can cause issues when >> the >> versions are incompatible (maybe someone forget to update maxent), >> you need to put it three times on your class path, you can get issues >> with inter-module code changes, an additional step in the build which can >> go wrong, etc. >> >> Additionally I once in a while use the cli stuff to do testing in my >> UIMA-AS system. >> There it is just handy that the cli stuff is on my server by default. >> > OK, so that's one more inconvenience. By the way, is it a good practice to > do this way? I would install a proper binary installation which is provided > and use a script. Own dog food kind of thing. > > I do not think that deploying commad-line utilities in a web application > lib folder is a good idea. It's like having an executable script in a > webapp, and hoping nobody will never discover and use it. That might seems > difficult to exploit, because you don't know how, but if you don't have > such tools on the classpath, there will not be even a potential exploit. I don't see the security issue here. If you are able to inject code into a JVM, you probably do other things than using our command line tools, e.g. stealing something which gets processed by OpenNLP, reading/writing files, trying to get root rights on that machine, etc. > > Well, we are still missing a few commands I wish to have on my server, e.g. >> show me the version of a model. > I just go inside and look into the description, but I use Far and its > transparent handling of archives makes this easy to do, but using a console > that might be less convenient. Again, differences in tools and development > practices. By the way, why not creating a JIRA for this idea? :) > +1 > >> We don't have any examples, but if we would have some, they should be >> distributed as source files. Because the whole point of having them is >> that people can read and copy them. > Yes, I understand this. And in addition it could be helpful to have a > script, which executes them and does a demo. Yes, but for demo we have the tools which can load a model and read text from the console. Anyway are really missing a web demo, which we can add to our website (jira already exist). Jörn