Telegram Group & Telegram Channel
Поиск почти-дубликатов в большой коллекции текстов
#tutorial #nlp

https://yorko.github.io/2023/practical-near-dup-detection

Добрались руки написать тьюториал по этой вроде бы простой задаче. Есть много текстов, скажем, 5 миллионов. Как бы среди них найти почти-дубликаты так, чтоб это было:
1) легко, желательно без всякого ML
2) масштабируемо
3) без false positives
4) и чтоб разметки на входе тоже не надо было?

Почему брут-форс не подходит, думаю, понятно: 5 млн. объектов – это 12.5 трлн. пар, можно конечно хадуп потопить купюрами, но можно и умнее поступить.

Помню, ходил я с этим вопросом в ODS, и что-то советы мне не очень понравились, кто-то советует ElasticSearch запрягать, кто-то советует BERT-эмбеддинги в векторную базу сложить. И так я поковырялся да пришел к LSH и ее имплементации в Python – Datasketch. Вот про как раз тьюториал, можно брать и пользоваться.

К слову, я эту технику применил к научным статьям, и там целая россыпь интересных приложений вылезла, те же paper mills, salami-slicing (когда берешь свою длинную статью, делишь на части и публикуешь несколько мелких статей), simultaneous submissions и т.д.



group-telegram.com/new_yorko_times/146
Create:
Last Update:

Поиск почти-дубликатов в большой коллекции текстов
#tutorial #nlp

https://yorko.github.io/2023/practical-near-dup-detection

Добрались руки написать тьюториал по этой вроде бы простой задаче. Есть много текстов, скажем, 5 миллионов. Как бы среди них найти почти-дубликаты так, чтоб это было:
1) легко, желательно без всякого ML
2) масштабируемо
3) без false positives
4) и чтоб разметки на входе тоже не надо было?

Почему брут-форс не подходит, думаю, понятно: 5 млн. объектов – это 12.5 трлн. пар, можно конечно хадуп потопить купюрами, но можно и умнее поступить.

Помню, ходил я с этим вопросом в ODS, и что-то советы мне не очень понравились, кто-то советует ElasticSearch запрягать, кто-то советует BERT-эмбеддинги в векторную базу сложить. И так я поковырялся да пришел к LSH и ее имплементации в Python – Datasketch. Вот про как раз тьюториал, можно брать и пользоваться.

К слову, я эту технику применил к научным статьям, и там целая россыпь интересных приложений вылезла, те же paper mills, salami-slicing (когда берешь свою длинную статью, делишь на части и публикуешь несколько мелких статей), simultaneous submissions и т.д.

BY New Yorko Times


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/new_yorko_times/146

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Founder Pavel Durov says tech is meant to set you free "Russians are really disconnected from the reality of what happening to their country," Andrey said. "So Telegram has become essential for understanding what's going on to the Russian-speaking world." Such instructions could actually endanger people — citizens receive air strike warnings via smartphone alerts. Telegram has become more interventionist over time, and has steadily increased its efforts to shut down these accounts. But this has also meant that the company has also engaged with lawmakers more generally, although it maintains that it doesn’t do so willingly. For instance, in September 2021, Telegram reportedly blocked a chat bot in support of (Putin critic) Alexei Navalny during Russia’s most recent parliamentary elections. Pavel Durov was quoted at the time saying that the company was obliged to follow a “legitimate” law of the land. He added that as Apple and Google both follow the law, to violate it would give both platforms a reason to boot the messenger from its stores. But Telegram says people want to keep their chat history when they get a new phone, and they like having a data backup that will sync their chats across multiple devices. And that is why they let people choose whether they want their messages to be encrypted or not. When not turned on, though, chats are stored on Telegram's services, which are scattered throughout the world. But it has "disclosed 0 bytes of user data to third parties, including governments," Telegram states on its website.
from us


Telegram New Yorko Times
FROM American