Add distance calculation information to docstrings

This commit is contained in:
Marty Oehme 2023-01-14 11:39:43 +01:00
parent bb2340fce1
commit fc051ed49e
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9
2 changed files with 4 additions and 2 deletions

View file

@ -87,7 +87,8 @@ class Annotation:
def colorname(self):
"""Return the stringified version of the annotation color.
Finds the closest named color to the annotation and returns it.
Finds the closest named color to the annotation and returns it,
using euclidian distance between the two color vectors.
"""
annot_colors = (
self.colors.get("stroke") or self.colors.get("fill") or (0.0, 0.0, 0.0)

View file

@ -225,7 +225,8 @@ class ExtractPlugin(PapersPlugin):
that is only the written words, sometimes that is only
annotation notes, sometimes it is both. Runs a similarity
comparison between strings to find out whether they
should both be included or are doubling up.
should both be included or are doubling up, using
Levenshtein distance.
"""
content = annotation.info["content"].replace("\n", " ")
written = page.get_textbox(annotation.rect).replace("\n", " ")