RE: svn commit: r1677903 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2: concept/BsvConceptFactory.java dictionary/BsvRareWordDictionary.java util/
Can we use InputStreamReader instead of FileReader? That way the resource can also be read from within a jar (potentially from maven central, etc.) and doesn't have to be fixed to a physical file... i.e. Instead of new BufferedReader(new FileReader(path)) new BufferedReader(new InputStreamReader(FileLocator.getAsStream(path))) --Pei -Original Message- From: seanfi...@apache.org [mailto:seanfi...@apache.org] Sent: Tuesday, May 05, 2015 6:42 PM To: comm...@ctakes.apache.org Subject: svn commit: r1677903 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2: concept/BsvConceptFactory.java dictionary/BsvRareWordDictionary.java util/JdbcConnectionFactory.java Author: seanfinan Date: Tue May 5 22:41:26 2015 New Revision: 1677903 URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_r1677903d=BQICaQc=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFUr=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WYm=9sLhiql1kiKYdaC8Nx3dTASt89nXQA3uy4kwesnHIags=wuwFl1DxU-yGWdGewROupvowHfYFay_u5LYKJUJF2VAe= Log: Use FileLocator to find BSV dictionaries Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_viewvc_ctakes_trunk_ctakes-2Ddictionary-2Dlookup-2Dfast_src_main_java_org_apache_ctakes_dictionary_lookup2_concept_BsvConceptFactory.java-3Frev-3D1677903-26r1-3D1677902-26r2-3D1677903-26view-3Ddiffd=BQICaQc=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFUr=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WYm=9sLhiql1kiKYdaC8Nx3dTASt89nXQA3uy4kwesnHIags=N_IOanbEYnXUTZ4ZO3vIjOeYun186kZGjXPKWp-Wi7ke= == --- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java (original) +++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ +++ ctakes/dictionary/lookup2/concept/BsvConceptFactory.java Tue May 5 +++ 22:41:26 2015 @@ -1,5 +1,6 @@ package org.apache.ctakes.dictionary.lookup2.concept; +import org.apache.ctakes.core.resource.FileLocator; import org.apache.ctakes.dictionary.lookup2.util.CuiCodeUtil; import org.apache.ctakes.dictionary.lookup2.util.LookupUtil; import org.apache.ctakes.dictionary.lookup2.util.TuiCodeUtil; @@ -34,11 +35,12 @@ final public class BsvConceptFactory imp } public BsvConceptFactory( final String name, final String bsvFilePath ) { - this( name, new File( bsvFilePath ) ); - } - - public BsvConceptFactory( final String name, final File bsvFile ) { - final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( bsvFile ); +// this( name, new File( bsvFilePath ) ); +// } +// +// public BsvConceptFactory( final String name, final File bsvFile ) { +// final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( bsvFile ); + final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( +bsvFilePath ); final MapLong, Concept conceptMap = new HashMap( cuiTuiTerms.size() ); for ( CuiTuiTerm cuiTuiTerm : cuiTuiTerms ) { final CollectionMapConceptCode, String, ? extends CollectionString codes @@ -90,11 +92,21 @@ final public class BsvConceptFactory imp * CUI|TUI|Text|PreferredTerm * /p * If the TUI column is omitted then the entityId for the dictionary is used as the TUI +* p/ +* //* @param bsvFile file containing term rows and bsv columns * -* @param bsvFile file containing term rows and bsv columns +* @param bsvFilePath file containing term rows and bsv columns * @return collection of all valid terms read from the bsv file */ - static private CollectionCuiTuiTerm parseBsvFile( final File bsvFile ) { +// static private CollectionCuiTuiTerm parseBsvFile( final File bsvFile ) { + static private CollectionCuiTuiTerm parseBsvFile( final String bsvFilePath ) { + File bsvFile = null; + try { + bsvFile = FileLocator.locateFile( bsvFilePath ); + } catch ( IOException ioE ) { + ioE.getMessage(); + return Collections.emptyList(); + } final CollectionCuiTuiTerm cuiTuiTerms = new ArrayList(); try ( final BufferedReader reader = new BufferedReader( new FileReader( bsvFile ) ) ) { String line = reader.readLine(); Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java URL:
build tool suggestion
Do you know offhand, would it be easy to have something run at build time that flags uses of FileReader? Related - do we have anything at build time that produces warnings that are looked at? When I check in a change, I just check whether the next build is successful or not. I don't look for warnings other than what I see when I try a compile of my own on my own system. Ideally I think it would be good to have the use of FileReader cause a meaningful warning. But if there's no relatively easy way to do that, might we consider having it cause a build failure? I think the benefits would outweigh the drawbacks. -- James From: Chen, Pei [pei.c...@childrens.harvard.edu] Sent: Tuesday, May 05, 2015 5:55 PM To: dev@ctakes.apache.org Subject: RE: svn commit: r1677903 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2: concept/BsvConceptFactory.java dictionary/BsvRareWordDictionary.java util/JdbcConnectionFactory.java Can we use InputStreamReader instead of FileReader? That way the resource can also be read from within a jar (potentially from maven central, etc.) and doesn't have to be fixed to a physical file... i.e. Instead of new BufferedReader(new FileReader(path)) new BufferedReader(new InputStreamReader(FileLocator.getAsStream(path))) --Pei -Original Message- From: seanfi...@apache.org [mailto:seanfi...@apache.org] Sent: Tuesday, May 05, 2015 6:42 PM To: comm...@ctakes.apache.org Subject: svn commit: r1677903 - in /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2: concept/BsvConceptFactory.java dictionary/BsvRareWordDictionary.java util/JdbcConnectionFactory.java Author: seanfinan Date: Tue May 5 22:41:26 2015 New Revision: 1677903 URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_r1677903d=BQICaQc=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFUr=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WYm=9sLhiql1kiKYdaC8Nx3dTASt89nXQA3uy4kwesnHIags=wuwFl1DxU-yGWdGewROupvowHfYFay_u5LYKJUJF2VAe= Log: Use FileLocator to find BSV dictionaries Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/BsvRareWordDictionary.java ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_viewvc_ctakes_trunk_ctakes-2Ddictionary-2Dlookup-2Dfast_src_main_java_org_apache_ctakes_dictionary_lookup2_concept_BsvConceptFactory.java-3Frev-3D1677903-26r1-3D1677902-26r2-3D1677903-26view-3Ddiffd=BQICaQc=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFUr=huK2MFkj300qccT8OSuuoYhy_xEYujfPwiAxhPVz5WYm=9sLhiql1kiKYdaC8Nx3dTASt89nXQA3uy4kwesnHIags=N_IOanbEYnXUTZ4ZO3vIjOeYun186kZGjXPKWp-Wi7ke= == --- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/BsvConceptFactory.java (original) +++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ +++ ctakes/dictionary/lookup2/concept/BsvConceptFactory.java Tue May 5 +++ 22:41:26 2015 @@ -1,5 +1,6 @@ package org.apache.ctakes.dictionary.lookup2.concept; +import org.apache.ctakes.core.resource.FileLocator; import org.apache.ctakes.dictionary.lookup2.util.CuiCodeUtil; import org.apache.ctakes.dictionary.lookup2.util.LookupUtil; import org.apache.ctakes.dictionary.lookup2.util.TuiCodeUtil; @@ -34,11 +35,12 @@ final public class BsvConceptFactory imp } public BsvConceptFactory( final String name, final String bsvFilePath ) { - this( name, new File( bsvFilePath ) ); - } - - public BsvConceptFactory( final String name, final File bsvFile ) { - final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( bsvFile ); +// this( name, new File( bsvFilePath ) ); +// } +// +// public BsvConceptFactory( final String name, final File bsvFile ) { +// final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( bsvFile ); + final CollectionCuiTuiTerm cuiTuiTerms = parseBsvFile( +bsvFilePath ); final MapLong, Concept conceptMap = new HashMap( cuiTuiTerms.size() ); for ( CuiTuiTerm cuiTuiTerm : cuiTuiTerms ) { final CollectionMapConceptCode, String, ? extends CollectionString codes @@ -90,11 +92,21 @@ final public class BsvConceptFactory imp * CUI|TUI|Text|PreferredTerm * /p * If the TUI column is omitted then the entityId for the dictionary is used as the TUI +* p/ +* //* @param bsvFile file containing term rows and bsv columns * -*
Re: CTAKES mirroring on github.
Ah, looks like the issue is still being looked into. https://issues.apache.org/jira/browse/INFRA-8553 On Mon, May 4, 2015 at 4:54 PM, jay vyas jayunit100.apa...@gmail.com wrote: Thanks kim. Can you file an infra issue ? they will look into it. I filed one originally On May 4, 2015 6:32 PM, Kim Ebert kim.eb...@perfectsearchcorp.com wrote: It looks like the github hasn't been updated in a while. Any reason? Thanks, Kim On Tue, Feb 17, 2015 at 10:36 AM, Finan, Sean sean.fi...@childrens.harvard.edu wrote: Our request is for a read-only mirror. However, if it ever becomes i/o, I don't know if this will have what you want, but http://git.apache.org/ Links to documentation (mostly server setup) http://www.apache.org/dev/git.html and a wiki (check toward middle and bottom for committer info) https://wiki.apache.org/general/GitAtApache -Original Message- From: Miller, Timothy [mailto:timothy.mil...@childrens.harvard.edu] Sent: Tuesday, February 17, 2015 12:31 PM To: dev@ctakes.apache.org Subject: Re: CTAKES mirroring on github. Is there any existing resource to help people who want to use git understand the right workflow to contribute to ctakes? (i.e. how this interacts with svn repos). Tim On 02/17/2015 12:23 PM, jay vyas wrote: Hi CTakes. Looks like infra finally got onto the JIRA i made for this a while back. They are currently working on fixing a couple of minor glitches w/ the mirroring (not showing all commits)... but there now is a mirror for CTakes on github. https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache _ctakesd=BQIBaQc=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFUr=Heup- IbsIg9Q1TPOylpP9FE4GTK-OqdTDRRNQXipowRLRjx0ibQrHEo8uYx6674hm=4sEI9mOp kTz6K-DjmNU1s8Do1TGA0_10HqJcowKpDxcs=fNVbyXzpBLSAG6-DIjBZ1vbMp0JGaX90 Lcdzg_EFVvMe=
[VOTE] Release Apache cTAKES 3.2.2 (rc1)
This is a call for a vote on releasing the following candidate (rc1) as Apache cTAKES 3.2.2. The major changes include: - Improved optional Temporal models (Time + Event Relationships models now available) - Other bug fixes/enhancements from Jira (see release notes Jira link below). I manually downloaded the bin as well as resources and tried the CVD with the AggregatePlaintextFastUMLSProcessor.xml and CPE testing the AggregateCdaProcessor. Would be great if folks have time to test/verify especially if you opened any of the Jira's below to ensure the bugs have been fixed/integrated. For more detailed information on the changes/release notes, please visit: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12313621version=12328717 The release was made using the cTAKES release process documented here: http://svn.apache.org/repos/asf/ctakes/site/backup/content/ctakes-release-guide.mdtext The candidate is available at: https://dist.apache.org/repos/dist/dev/ctakes/ctakes-3.2.2-rc1/apache-ctakes-3.2.2-src.tar.gz /.zip The tag to be voted on: http://svn.apache.org/repos/asf/ctakes/tags/ctakes-3.2.2-rc1 The MD5 checksum of the tarball can be found at: https://dist.apache.org/repos/dist/dev/ctakes/ctakes-3.2.2-rc1/apache-ctakes-3.2.2-src.tar.gz.md5 /.zip.md5 The signature of the tarball can be found at: https://dist.apache.org/repos/dist/dev/ctakes/ctakes-3.2.2-rc1/apache-ctakes-3.2.2-src.tar.gz.asc /.zip.asc Apache cTAKES' KEYS file, containing the PGP keys used to sign the release: https://dist.apache.org/repos/dist/release/ctakes/KEYS Please vote on releasing these packages as Apache cTAKES 3.2.2. The vote is open for at least the next 72 hours. The vote passes if at least three binding +1 votes are cast. [ ] +1 Release the packages as Apache cTAKES 3.2.2 [ ] -1 Do not release the packages because... Also, the convenience binary can be found at: https://dist.apache.org/repos/dist/dev/ctakes/ctakes-3.2.2-rc1/apache-ctakes-3.2.2-bin.tar.gz.md5 /.zip Thanks!