X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=szyfrow%2Fsupport%2Fsegment.py;h=77fb5bae6809406b99918dec984f6df3d6001ff0;hb=748b5cceaa346d3097c58229ea04ead0c7e3f48e;hp=954dd97f83a22b4ee1917e41045009dc76a4a246;hpb=27c8005f6dea0026887b80a01b5f93a8f1b3c2b2;p=szyfrow.git diff --git a/szyfrow/support/segment.py b/szyfrow/support/segment.py index 954dd97..77fb5ba 100644 --- a/szyfrow/support/segment.py +++ b/szyfrow/support/segment.py @@ -1,3 +1,8 @@ +"""Setments a string of characters into words, following a language model. + +Implementation taken from [Peter Norvig](https://norvig.com/ngrams/ch14.pdf) +""" + import sys from functools import lru_cache from szyfrow.support.language_models import Pwords