[
https://issues.apache.org/jira/browse/CTAKES-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127963#comment-14127963
]
Tim OConnell commented on CTAKES-311:
-------------------------------------
Hi Pei - here's my attempt at creating the patch. I've just created it for the
ytex scripts - doing a search on the cTAKES project yielded 896 matches for
'edu.mayo.bmi.core' - I'm afraid I don't have the fortitude to attempt to patch
~900 instances of this and risk causing some serious issues. I'm new to
Eclipse, so please let me know if the syntax of this patch isn't correct. As
well, as I don't have access to SQL server/Oracle systems (and I haven't set up
HSQL), I haven't had a chance to validate it outside of MySQL.
Index: ctakes-ytex/scripts/data/hsql/uima/create_view.sql
===================================================================
--- ctakes-ytex/scripts/data/hsql/uima/create_view.sql (revision 1620506)
+++ ctakes-ytex/scripts/data/hsql/uima/create_view.sql (working copy)
@@ -57,7 +57,7 @@
inner join anno_contain ac on da.anno_base_id = ac.child_anno_base_id
INNER join anno_base s
on ac.parent_anno_base_id = s.anno_base_id
- and s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'edu.mayo.bmi.uima.core.type.textspan.Sentence')
+ and s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'org.apache.ctakes.typesystem.type.textspan.Sentence')
INNER JOIN document d on da.document_id = d.document_id
;
Index: ctakes-ytex/scripts/data/mssql/uima/create_view.sql
===================================================================
--- ctakes-ytex/scripts/data/mssql/uima/create_view.sql (revision 1620506)
+++ ctakes-ytex/scripts/data/mssql/uima/create_view.sql (working copy)
@@ -59,8 +59,8 @@
select ac.child_anno_base_id, s.span_begin, s.span_end
from $(db_schema).anno_contain ac
INNER join $(db_schema).anno_base s on ac.parent_anno_base_id =
s.anno_base_id
- where s.uima_type_id in (select uima_type_id from $(db_schema).ref_uima_type
where uima_type_name = 'edu.mayo.bmi.uima.core.type.textspan.Sentence')
- and ac.child_uima_type_id in (select uima_type_id from
$(db_schema).ref_uima_type where uima_type_name =
'edu.mayo.bmi.uima.core.type.textsem.EntityMention')
+ where s.uima_type_id in (select uima_type_id from $(db_schema).ref_uima_type
where uima_type_name = 'org.apache.ctakes.typesystem.type.textspan.Sentence')
+ and ac.child_uima_type_id in (select uima_type_id from
$(db_schema).ref_uima_type where uima_type_name =
'org.apache.ctakes.typesystem.type.textsem.EntityMention')
) s on da.anno_base_id = s.child_anno_base_id
INNER JOIN $(db_schema).v_document d on da.document_id = d.document_id
;
Index: ctakes-ytex/scripts/data/mysql/uima/create_view.sql
===================================================================
--- ctakes-ytex/scripts/data/mysql/uima/create_view.sql (revision 1620506)
+++ ctakes-ytex/scripts/data/mysql/uima/create_view.sql (working copy)
@@ -57,7 +57,7 @@
inner join anno_contain ac on da.anno_base_id = ac.child_anno_base_id
INNER join anno_base s
on ac.parent_anno_base_id = s.anno_base_id
- and s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'edu.mayo.bmi.uima.core.type.textspan.Sentence')
+ and s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'org.apache.ctakes.typesystem.type.textspan.Sentence')
INNER JOIN document d on da.document_id = d.document_id
;
Index: ctakes-ytex/scripts/data/orcl/uima/create_view.sql
===================================================================
--- ctakes-ytex/scripts/data/orcl/uima/create_view.sql (revision 1620506)
+++ ctakes-ytex/scripts/data/orcl/uima/create_view.sql (working copy)
@@ -58,8 +58,8 @@
select ac.child_anno_base_id, s.span_begin, s.span_end
from anno_contain ac
INNER join anno_base s on ac.parent_anno_base_id = s.anno_base_id
- where s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'edu.mayo.bmi.uima.core.type.textspan.Sentence')
- and ac.child_uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'edu.mayo.bmi.uima.core.type.textsem.EntityMention')
+ where s.uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'org.apache.ctakes.typesystem.type.textspan.Sentence')
+ and ac.child_uima_type_id in (select uima_type_id from ref_uima_type where
uima_type_name = 'org.apache.ctakes.typesystem.type.textsem.EntityMention')
) s on da.anno_base_id = s.child_anno_base_id
INNER JOIN v_document d on da.document_id = d.document_id
;
> v_document_cui_sent View returns no results in cTAKES-YTEX
> ----------------------------------------------------------
>
> Key: CTAKES-311
> URL: https://issues.apache.org/jira/browse/CTAKES-311
> Project: cTAKES
> Issue Type: Bug
> Components: ctakes-ytex
> Affects Versions: 3.2.1
> Reporter: Tim OConnell
> Priority: Minor
> Labels: patch
> Fix For: 3.2.1
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> The script for the creation of ytex's v_document_cui_sent view contains an
> error - in
> CTAKES_HOME\bin\ctakes-ytex\scripts\data\SQL_TYPE\uima\create_view.sql
> Where the script reads '....where (`ref_uima_type`.`uima_type_name` =
> 'edu.mayo.bmi.uima.core.type.textspan.Sentence'))))) join `document` `d`
> on((`da`.`document_id` = `d`.`document_id...', the 'edu.mayo.bmi.uima...' is
> the old notation for the uima_type_name that this view depends on. It should
> be 'org.apache.ctakes.typesystem.type.textspan.Sentence'.
> On Mon, Sep 8, 2014 at 1:55 PM, Pei Chen <[email protected]> wrote:
> Hi Tim,
> Thanks for catching that- yes, would you mind creating a jira for that?
> Even better if you can attach a patch for it (perhaps a good idea to
> search/replace on the entire project) and we can include in the next
> 3.2.1 patch...
> --Pei
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)