我正在尝试使用 Duke 将记录从一个数据库匹配到另一个数据库。一个分贝有歌曲标题+作者。我正在尝试匹配另一个数据库以查找重复项和相应的记录。
我已经让杜克跑了,我可以看到一些记录得到匹配。但是无论我做什么,找到的正确链接总是= 0%,我就是无法访问链接文件。
这是我目前所做的:
<duke>
<schema>
<threshold>0.79</threshold>
<maybe-threshold>0.70</maybe-threshold>
<path>test</path>
<property type="id">
<name>PublishingID</name>
</property>
<property type="id">
<name>AmgID</name>
</property>
<property>
<name>NAME</name>
<comparator>no.priv.garshol.duke.comparators.JaroWinkler</comparator>
<low>0.12</low>
<high>0.61</high>
</property>
<property>
<name>TITLE</name>
<comparator>no.priv.garshol.duke.comparators.Levenshtein</comparator>
<low>0.09</low>
<high>0.93</high>
</property>
</schema>
<group>
<jdbc>
<param name="driver-class" value="com.mysql.jdbc.Driver"/>
<param name="connection-string" value="jdbc:mysql://127.0.0.1"/>
<param name="user-name" value="root"/>
<param name="password" value="root"/>
<param name="query" value="
SELECT pSongs.song_id, pSongs.songtitle, pSongs.publisher_id, pWriters.first_name AS writer_first_name, pWriters.last_name AS writer_last_name
FROM devel_matching.publisher_songs AS pSongs
INNER JOIN devel_matching.publisher_writers as pWriters ON pWriters.publisher_id = pSongs.publisher_id AND pWriters.song_id = pSongs.song_id
WHERE pSongs.writers LIKE '%LENNON, JOHN%'
LIMIT 20000;"/>
<column name="song_id" property="PublishingID"/>
<column name="songtitle" property="TITLE" cleaner="no.priv.garshol.duke.cleaners.LowerCaseNormalizeCleaner"/>
<column name="writer_first_name" property="NAME" cleaner = "no.priv.garshol.duke.cleaners.LowerCaseNormalizeCleaner"/>
</jdbc>
</group>
<group>
<jdbc>
<param name="driver-class" value="com.mysql.jdbc.Driver"/>
<param name="connection-string" value="jdbc:mysql://127.0.0.1"/>
<param name="user-name" value="root"/>
<param name="password" value="root"/>
<param name="query" value="
SELECT amgSong.id, amgSong.track, SUBSTRING_INDEX(SUBSTRING_INDEX(amgSong.composer, '/', numbers.n), '/', -1) composer
FROM
devel_matching.numbers INNER JOIN devel_matching.track as amgSong
ON CHAR_LENGTH(amgSong.composer) - CHAR_LENGTH(REPLACE(amgSong.composer, '/', '')) >= numbers.n - 1
WHERE amgSong.composer like '%lennon%'
LIMIT 5000;"/>
<column name="id" property = "AmgID"/>
<column name="track" property="TITLE" cleaner="no.priv.garshol.duke.cleaners.LowerCaseNormalizeCleaner"/>
<column name="composer" property="NAME" cleaner = "no.priv.garshol.duke.cleaners.LowerCaseNormalizeCleaner"/>
</jdbc>
</group>
输出:
- 总记录:5000
- 总匹配数:8284
- 不匹配总数:1587
- 找到正确的链接:0 / 0 (0.0%)
- 发现错误链接:0 / 0 (0.0%)
- 发现未知链接:8284
- 链接百分比正确 0.0%,错误 0.0%,未知 100.0%
- 精度 0.0%,召回率 NaN%,f 数 0.0
在 Spring STS 上运行:程序参数 =--progress --verbose --testfile=linked.txt --testdebug --showmatches duke.xml
它没有写入linked.txt 或找到任何正确的链接。不知道我在这里做错了什么。任何帮助都是极好的。