Pattern Comparison
I used the following to automatically adjust some domain names.
, , , . , , "" .
, , .
:
Mozilla Firefox
= > ['mo', 'oz', 'zi', 'il', 'll', 'la', 'a', 'f', 'fi', 'ir', 're', 'fo', 'ox']
:
- 'Firefox 3.5' = > 5,
- 'Adobe Reader' = > 0,
- 'Adobe Acrobat Reader v10' = > 1
.
, , .
c - , :
d = c (A) + c (B) - c (A + B)
d, A B.
, , , , ..
, , .
SGDB
SQL Server, SQLite MySQL .
"", .
MySQL:
SELECT
t.*,
MATCH(my_field) AGAINST 'Mozilla Firefox' as relevance
FROM
table t
WHERE
MATCH(my_field) AGAINST 'Mozilla Firefox'
ORDER BY relevance DESC
LIMIT 100