# Comparison Functions

### Table of Contents

* [vocalizedlike](#vocalizedlike)
* [waznlike](#waznlike)
* [shaddalike](#shaddalike)

### vocalizedlike

Checks if two words are vocalized similar based on their vocalized similarity score.

**Parameters**

* `word1` (String): The first word to compare.
* `word2` (String): The second word to compare.

**Returns**

* Boolean: `true` if the words are vocalized similar, `false` otherwise.

**Example**

```javascript
const word1 = "سَلَام";
const word2 = "سَلِيم";
console.log(vocalizedlike(word1, word2)); // Output: false
```

### waznlike

Checks if a given word matches a specified pattern (wazn) and optionally extracts the root.

**Parameters**

* `word1` (String): The word to be checked against the wazn.
* `wazn` (String): The pattern to be matched.
* `extractRoot` (Boolean, optional): If `true`, the function returns the extracted root instead of a boolean value. Defaults to `false`.

**Returns**

* Boolean or String: If `extractRoot` is `false`, returns `true` if the word matches the wazn and `false` otherwise. If `extractRoot` is `true`, returns the extracted root if the word matches the wazn, and `false` otherwise.

**Example**

```javascript
const word = "فَعَلَ";
const pattern = "فَعَلَ";
console.log(waznlike(word, pattern)); // Output: true
console.log(waznlike(word, pattern, true)); // Output: "فعل"
```

### shaddalike

Checks if two words are similar based on the position of shadda and their characters.

**Parameters**

* `partial` (String): The first word to compare.
* `fully` (String): The second word to compare.

**Returns**

* Boolean: `true` if the words are similar based on the position of shadda and their characters, `false` otherwise.

**Example**

```javascript
const partialWord = "مُتَحَدَّث";
const fullyWord = "مُتَحَدَّث";
console.log(shaddalike(partialWord, fullyWord)); // Output: true
```
