projects
/
szyfrow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Started on documentation
[szyfrow.git]
/
szyfrow
/
support
/
segment.py
diff --git
a/szyfrow/support/segment.py
b/szyfrow/support/segment.py
index 954dd97f83a22b4ee1917e41045009dc76a4a246..77fb5bae6809406b99918dec984f6df3d6001ff0 100644
(file)
--- 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
import sys
from functools import lru_cache
from szyfrow.support.language_models import Pwords