Return-Path: X-Original-To: apmail-ctakes-dev-archive@www.apache.org Delivered-To: apmail-ctakes-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 1A3FECF67 for ; Tue, 11 Jun 2013 17:50:29 +0000 (UTC) Received: (qmail 39962 invoked by uid 500); 11 Jun 2013 17:50:29 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 39875 invoked by uid 500); 11 Jun 2013 17:50:27 -0000 Mailing-List: contact dev-help@ctakes.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ctakes.apache.org Delivered-To: mailing list dev@ctakes.apache.org Received: (qmail 39867 invoked by uid 99); 11 Jun 2013 17:50:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jun 2013 17:50:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Pei.Chen@childrens.harvard.edu designates 134.174.20.73 as permitted sender) Received: from [134.174.20.73] (HELO mailsmtp3.childrenshospital.org) (134.174.20.73) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jun 2013 17:50:21 +0000 Received: from pps.filterd (mailsmtp3.childrenshospital.org [127.0.0.1]) by mailsmtp3.childrenshospital.org (8.14.5/8.14.5) with SMTP id r5BHmt3L022118 for ; Tue, 11 Jun 2013 13:49:59 -0400 Received: from smtpbdc1.chboston.org (smtpbdc1.chboston.org [10.20.18.104]) by mailsmtp3.childrenshospital.org with ESMTP id 1cvtfydk54-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 11 Jun 2013 13:49:59 -0400 Received: from pps.filterd (smtpbdc1.chboston.org [127.0.0.1]) by smtpbdc1.chboston.org (8.14.5/8.14.5) with SMTP id r5BHk1dQ026936 for ; Tue, 11 Jun 2013 13:49:59 -0400 Received: from chexhubcasbdc1.chboston.org (internal-bdc-nat-v2260.tch.harvard.edu [10.20.18.4]) by smtpbdc1.chboston.org with ESMTP id 1cpat4nnbp-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Tue, 11 Jun 2013 13:49:59 -0400 Received: from CHEXMBX1A.CHBOSTON.ORG ([fe80::3c05:8ca9:55a6:f320]) by CHEXHUBCASBDC1.CHBOSTON.ORG ([::1]) with mapi id 14.02.0342.003; Tue, 11 Jun 2013 13:49:58 -0400 From: "Chen, Pei" To: "dev@ctakes.apache.org" Subject: InputSteam instead of java.io.File Thread-Topic: InputSteam instead of java.io.File Thread-Index: Ac5mxCr/wQmagF+nS2CHxATfUU7uLg== Date: Tue, 11 Jun 2013 17:49:58 +0000 Message-ID: <924DE05C19409B438EB81DE683A942D91052CA09@CHEXMBX1A.CHBOSTON.ORG> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.2.182] Content-Type: multipart/alternative; boundary="_000_924DE05C19409B438EB81DE683A942D91052CA09CHEXMBX1ACHBOST_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-06-11_07:2013-06-11,2013-06-11,1970-01-01 signatures=0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-06-11_07:2013-06-11,2013-06-11,1970-01-01 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_924DE05C19409B438EB81DE683A942D91052CA09CHEXMBX1ACHBOST_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable While working on the test cases in cTAKES, I've encountered couple of issue= s and suggestions: 1) File or Url.getRawPath() became problematic if they are read in fro= m the jars from the classpath and which couldn't resolve to a physical File= . a. Suggestion: Wherever possible, replace loading of resouces via jav= a.io.File with InputStream instead. . We can add a new method in the FileL= ocator util and deprecate the old File method. 2) Sentence Dectector is still using the OpenNLP 1.4 mechanism of load= ing it's model file. a. Suggestion: Let's update it to use the new 1.5 way similar to POST= agger. (Remove non longer required classes: SuffixMaxentModelResourceImpl,= MaxentModelResource, SuffixSensitiveGISModelReader, classes etc.) Background: Certain unit tests fail because they can't be resolved via jars from the cl= asspath because the code is explicitly looking for File on disk instead of = input stream. But in order to solve it appropriately, it had a cascading e= ffect and required a lot more changes, but it's probably a good time to upd= ate those projects anyhow. --Pei --_000_924DE05C19409B438EB81DE683A942D91052CA09CHEXMBX1ACHBOST_--