vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | use dataverse fuzzy1; |
| 2 | |
| 3 | declare type DBLPType as open { |
| 4 | id: int32, |
| 5 | dblpid: string, |
| 6 | title: string, |
| 7 | authors: string, |
| 8 | misc: string |
| 9 | } |
| 10 | |
| 11 | declare nodegroup group1 on rainbow-01, rainbow-02, rainbow-03, |
| 12 | rainbow-04, rainbow-05; |
| 13 | |
| 14 | declare dataset DBLP(DBLPType) |
| 15 | partitioned by key id on group1; |
| 16 | |
| 17 | write output to rainbow-01:"/home/hyracks/out.txt"; |
| 18 | |
| 19 | for $x in dataset('DBLP') |
| 20 | let $ed := edit-distance($x.authors, "Michael Carey") |
| 21 | where $ed <= 3 |
| 22 | order by $ed, $x.authors |
| 23 | return { "edit-distance":$ed, "authors":$x.authors, "title":$x.title } |