Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Review: Approve The previous version of the soundex-key function had indeed a problem with the string 3-D Adventure, returning a stack overflow since it as recursively trying to produce a soundex key with just 4 characters. The new implementation fixes this, and also seems to be correct. I've approved the revision. Nonetheless, it makes no sense to call soundex-key with an input that does not correspond to a single English word. Maybe the documentation should be changed in order to indicate this. -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
The proposal to merge lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/fix-soundex_key-2013-05-21T14-25-30.124Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Validation queue job fix-soundex_key-2013-05-21T14-25-30.124Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
The proposal to merge lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module. Commit message: fix and tests for soundex-key function Requested reviews: Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. === modified file 'src/com/zorba-xquery/www/modules/data-cleaning/phonetic-string-similarity.xq' --- src/com/zorba-xquery/www/modules/data-cleaning/phonetic-string-similarity.xq 2012-09-28 13:34:20 + +++ src/com/zorba-xquery/www/modules/data-cleaning/phonetic-string-similarity.xq 2013-05-18 00:43:24 + @@ -45,14 +45,13 @@ : @return The Soundex key for the given input string. : @example test/Queries/data-cleaning/phonetic-string-similarity/soundex-key.xq :) -declare function simp:soundex-key ( $s1 as xs:string ) as xs:string { - let $group1 := replace(upper-case(substring($s1,2)),[BFPV],1) - let $groups := replace(replace(replace(replace(replace(replace($group1,[CGJKQSXZ],2),[DT],3),L,4),[MN],5),R,6),[^1-6],) - let $merge := replace($groups,([1-6])\1,$1) - let $result := concat(upper-case(substring($s1,1,1)), $merge) - return if (string-length($result) 4 and matches($result,([1-6])\1)) -then (simp:soundex-key($result)) -else (substring(concat($result,),1,4)) +declare function simp:soundex-key ( $s1 as xs:string ) as xs:string { + let $clean := replace(replace(replace(replace(replace(replace(replace(upper-case($s1),[^1-9A-Z],),([BFPV])[HW]*[BFPV],$1),([CGJKQSXZ])[HW]*[CGJKQSXZ],$1),([DT])[HW]*[DT],$1),([L])[HW]*[L],$1),([MN])[HW]*[MN],$1),([R])[HW]*[R],$1) + let $first := substring($clean,1,1) + let $suffix := replace(replace(replace(replace(replace(replace(substring($clean,2),[BFPV],1),[CGJKQSXZ],2),[DT],3),L,4),[MN],5),[R],6) + let $merge := replace(replace($suffix, ([1-6])\1,$1),[^1-6], ) + let $result := concat($first, $merge) + return substring(concat($result,),1,4) }; (:~ === modified file 'test/ExpQueryResults/data-cleaning/phonetic-string-similarity/soundex-key.xml.res' --- test/ExpQueryResults/data-cleaning/phonetic-string-similarity/soundex-key.xml.res 2011-07-19 19:12:03 + +++ test/ExpQueryResults/data-cleaning/phonetic-string-similarity/soundex-key.xml.res 2013-05-18 00:43:24 + @@ -1,1 +1,1 @@ -R163 \ No newline at end of file +R163 true === modified file 'test/Queries/data-cleaning/phonetic-string-similarity/soundex-key.xq' --- test/Queries/data-cleaning/phonetic-string-similarity/soundex-key.xq 2011-07-19 19:12:03 + +++ test/Queries/data-cleaning/phonetic-string-similarity/soundex-key.xq 2013-05-18 00:43:24 + @@ -1,3 +1,130 @@ -import module namespace simp = http://www.zorba-xquery.com/modules/data-cleaning/phonetic-string-similarity;; +import module namespace simpl = http://www.zorba-xquery.com/modules/data-cleaning/phonetic-string-similarity;; -simp:soundex-key(Robert) +simpl:soundex-key(Robert), +simpl:soundex-key(BARHAM) eq B650 and +simpl:soundex-key(BARONE) eq B650 and +simpl:soundex-key(BARRON) eq B650 and +simpl:soundex-key(BERNA) eq B650 and +simpl:soundex-key(BIRNEY) eq B650 and +simpl:soundex-key(BIRNIE) eq B650 and +simpl:soundex-key(BOOROM) eq B650 and +simpl:soundex-key(BOREN) eq B650 and +simpl:soundex-key(BORN) eq B650 and +simpl:soundex-key(BOURN) eq B650 and +simpl:soundex-key(BOURNE) eq B650 and +simpl:soundex-key(BOWRON) eq B650 and +simpl:soundex-key(BRAIN) eq B650 and +simpl:soundex-key(BRAME) eq B650 and +simpl:soundex-key(BRANN) eq B650 and +simpl:soundex-key(BRAUN) eq B650 and +simpl:soundex-key(BREEN) eq B650 and +simpl:soundex-key(BRIEN) eq B650 and +simpl:soundex-key(BRIM) eq B650 and +simpl:soundex-key(BRIMM) eq B650 and +simpl:soundex-key(BRINN) eq B650 and +simpl:soundex-key(BRION) eq B650 and +simpl:soundex-key(BROOM) eq B650 and +simpl:soundex-key(BROOME) eq B650 and +simpl:soundex-key(BROWN) eq B650 and +simpl:soundex-key(BROWNE) eq B650 and +simpl:soundex-key(BRUEN) eq B650 and +simpl:soundex-key(BRUHN) eq B650 and +simpl:soundex-key(BRUIN) eq B650 and +simpl:soundex-key(BRUMM) eq B650 and +simpl:soundex-key(BRUN) eq B650 and +simpl:soundex-key(BRUNO) eq B650 and +simpl:soundex-key(BRYAN) eq B650 and +simpl:soundex-key(BURIAN) eq B650 and +simpl:soundex-key(BURN) eq B650 and +simpl:soundex-key(BURNEY) eq B650 and +simpl:soundex-key(BYRAM) eq B650 and +simpl:soundex-key(BYRNE) eq B650 and +simpl:soundex-key(BYRON) eq B650 and +simpl:soundex-key(BYRUM) eq B650 and +T235 eq simpl:soundex-key(testing) and +T000 eq simpl:soundex-key(The) and +Q200 eq simpl:soundex-key(quick) and +B650 eq simpl:soundex-key(brown) and +F200 eq simpl:soundex-key(fox) and +J513 eq simpl:soundex-key(jumped) and +O160 eq simpl:soundex-key(over) and +T000 eq simpl:soundex-key(the) and +L200 eq simpl:soundex-key(lazy) and +D200 eq
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
The proposal to merge lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/fix-soundex_key-2013-05-18T00-44-28.084Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Validation queue job fix-soundex_key-2013-05-18T00-44-28.084Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
Voting does not meet specified criteria. Required: Approve 1, Disapprove 1, Needs Fixing 1, Pending 1, Needs Information 1, Resubmit 1. Got: 1 Approve. -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module
The proposal to merge lp:~zorba-coders/zorba/fix-soundex_key into lp:zorba/data-cleaning-module has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 -- https://code.launchpad.net/~zorba-coders/zorba/fix-soundex_key/+merge/164561 Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp