A set of similarity metricts to compare html files.
This package provides a set of functions to measure the similarity between web pages.
The quick way:
pip install html-similarity
How it works?
We use sequence comparison fo the html tags to compute the structural similarity instead of tree edit distance because tree edit distance is slower than sequence comparison.
The idea of sequence comparison was taken from Page Compare.
Extracts css classes of each html document and calculates the jaccard similarity of the sets of classes. The idea was taken from 
Joint Similarity (Structural Similarity and Style Similarity)
The joint similarity metric is calculated as:
k * structural_similarity(document_1, document_2) + (1 - k) * style_similarity(document_1, document_2)
This was taken from 
The value is in the interval of 0 and 1.
Recommendations for joint similarity
Using k=0.3 give use better results. The style similarity can gives more information about the similarity rather than the style.
|||(1, 2) T. Gowda and C. A. Mattmann, Clustering Web Pages Based on Structure and Style Similarity (Application Paper), 2016 IEEE 17th International Conference on Information Reuse and Integration (IRI), Pittsburgh, PA, 2016, pp. 175-180.|
See CONTRIBUTING.md file
- [ ] Add information about the package in pypi
- [ ] Add documentation
- [ ] Add examples
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size html_similarity-0.3.2-py3-none-any.whl (5.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size html-similarity-0.3.2.tar.gz (3.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for html_similarity-0.3.2-py3-none-any.whl