alexander.behm | c576c60 | 2012-07-06 02:41:15 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Tests that the FuzzyEqRule rewrites ~= using edit distance |
| 3 | * into edit-distance-check. |
| 4 | * Success : Yes |
| 5 | */ |
| 6 | |
| 7 | drop dataverse test if exists; |
| 8 | create dataverse test; |
| 9 | use dataverse test; |
| 10 | |
| 11 | create type DBLPType as closed { |
| 12 | id: int32, |
| 13 | dblpid: string, |
| 14 | title: string, |
| 15 | authors: string, |
| 16 | misc: string |
| 17 | } |
| 18 | |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 19 | create dataset DBLP(DBLPType) primary key id; |
alexander.behm | c576c60 | 2012-07-06 02:41:15 +0000 | [diff] [blame] | 20 | |
alexander.behm | c576c60 | 2012-07-06 02:41:15 +0000 | [diff] [blame] | 21 | write output to nc1:"rttest/similarity_fuzzyeq-to-edit-distance-check.adm"; |
| 22 | |
| 23 | set simfunction 'edit-distance'; |
| 24 | set simthreshold '1'; |
| 25 | |
| 26 | // Tests two rules: FuzzyEqRule and SimilarityCheckRule |
| 27 | for $o in dataset('DBLP') |
| 28 | where $o.authors ~= "Michael J. Carey" |
| 29 | return $o |