mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-21 08:42:03 +00:00
feat: Add PPM (Prediction by Partial Matching) algorithm implementation
- Implemented the PPM algorithm for data compression and decompression. - Added methods for updating the model, encoding, and decoding symbols. - Included utility functions for reading from files and testing the algorithm. - Verified functionality with various datasets to ensure accuracy. This addition enhances the repository's collection of Python algorithms.
This commit is contained in:
parent
2f37ee9077
commit
2c279c492d
|
@ -2,6 +2,7 @@ from __future__ import annotations
|
|||
import sys
|
||||
from collections import defaultdict
|
||||
|
||||
#Description for the ppm algorithm can be found at https://en.wikipedia.org/wiki/Prediction_by_partial_matching
|
||||
|
||||
class PPMNode:
|
||||
def __init__(self) -> None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user