semvec/pypi-packages huggingface dataset:
html-matcher 0.1.1
Algorithms to find similarity between HTML pages.
Keywords: python,website,webapp,html,similarity,match,rate

# HTML Matcher

The pypi package in Python contains a series of functions for calculating the similarity ratio between pages in websites
or web applications.

## How to INSTALL?

```
pip install html-matcher
```

## How to USE?

By comparing the HTML structure, style, or both, the similarity ratio can be computed. Two techniques are available for
structure comparison: Matching Subsequences (MS) and All Path Tree Edit Distance (APTED). One algorithm that uses the
jaccard similarity metric is offered for style comparison.

### Structure

#### MS

#### Example

```
ms = MatchingSubsequences()
ratio = ms.similarity(page1,page2)
```

or you can use our improved method of MS that provides better results

```
ms = MatchingSubsequencesOptimized()
ratio = ms.similarity(page1,page2)
```

#### APTED

#### Example

```
apted = AllPathTreeEditDistance()
ratio = apted.similarity(page1,page2)
```

or you can use our improved method of APTED that reduces computational time

```
apted = AllPathTreeEditDistanceOptimized()
ratio = apted.similarity(page1,page2)
```

### Style

Each html document's css classes are extracted, and the **jaccard similarity** of the sets of classes is calculated.

#### Jaccard Similarity

```
J(A,B) = |A ∩ B| / |A U B|
```

#### Example

```
style = StyleSimilarity()
ratio = style.similarity(page1,page2)
```

### Structure & Style

We must pass a weight for each metric when combining similarity measures (k). The default value is 0.5, but in our
experiments, we found that, when comparing web pages based on their similarity ratio, structure takes precedence over
style, so 0.7 produces better results.

```
k * similarity(page_1, page_2) + (1 - k) * similarity(page_1, page_2)
```

#### Example

```
style = StyleSimilarity()
apted = AllPathTreeEditDistanceOptimized()
method = MixedSimilarity(apted, style, k=0.7)
ratio = method.similarity(page1,page2)
```
spyll 1.2.3
Spyll is an open source Python package that aims to make text file handling more streamlined. Works with Python versions 3.6+

# Spyll by Dango Labs
### Text file handling made simple.
---
## Compatability
Spyll will only work on machines running Python 3.6+

## Installation
Spyll is on PyPi so you can install it with the following command:

`pip install Spyll`

## Supported features
* Writing to text files
* Reading from text files
* Renaming files
* Counting occurances of a string in a text file
* Checking if a file contains a string
* Directory searching

## Contributing
Spyll is open source and we welcome contributions from the community.

To clone the repository, run the following command:

`git clone https://github.com/dangolabs/spyll.git`

---

[![Dango Labs](https://dangolabs.com/content/logo/PNG/dangolabs-1000.png)](https://dangolabs.com)