if I need to list concepts and I want to find the similarities between these lists, how can I find how many two similar lists? as an example, if I have two lists that describe the list of attributes book1 (author, brand, isbn, category, quantity) list2 (author, price, brand)
The easiest way is probably to calculate the editing distance between each of the list items.
You can use the Jaccard index to compare the similarity of the two sets.
Perl
. #
:: ;
use Data::Dumper ; use lib "specify the path "; use List::Compare; @Llist= ( 1,2,3,4,6) ; @Rlist=(101,3,4,5,20,30) ; $lc = List::Compare->new( \@Llist, \@Rlist); print Dumper \$lc->get_intersection();
Source: https://habr.com/ru/post/1735709/More articles:How can I check / profile my PHP / MYSQL news site so that I can compare it later with the transcoded version of django / postgres? - phphow to set badgevalue in tabbar on iphone? - objective-cHow to find a list of Hungarian designation prefixes? - coding-styleDisplay notification popup - c ++javascript hide code for private keys etc. - javascriptУдалите команду onclick из дочернего элемента div - javascriptOptimizations Used by ORM - performanceUnity and Enterprise Library Data Access Blocks - c #Как отображать PDF файлы в браузерах без плагина Acrobat - pdfHow do we resolve warning C4055? - cAll Articles