|
|
|
|
|
by keepamovin
1043 days ago
|
|
10 years ago I created an algorithm to generalize CSS selectors based on applying the "sequence alignment" algorithm (from bioinformatics / string matching) to objects (bags of attribute / key values, ie, HTML elements). This let you select two or more examples and produce a selector that captures what you meant. More here: https://github.com/00000o1/selector-generalization There've been multiple attempts at such a thing over the years, but I like this approach for its essentially simple foundation in solid algorithms. Be warned tho this code is old! I haven't yet got around to updating it to make it more "modern" etc!! |
|
https://dosyago.github.io/selector-generalization/