alexander.behm | c576c60 | 2012-07-06 02:41:15 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Tests that the FuzzyEqRule rewrites ~= using Jaccard |
| 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-jaccard-check.adm"; |
| 22 | |
| 23 | set simfunction 'jaccard'; |
| 24 | set simthreshold '0.8f'; |
| 25 | |
| 26 | // Tests two rules: FuzzyEqRule and SimilarityCheckRule |
| 27 | for $paper in dataset('DBLP') |
| 28 | where word-tokens($paper.title) ~= word-tokens("Transactions for Cooperative Environments") |
| 29 | return $paper |