diff --git a/pubs/plugs/extract/annotation.py b/pubs/plugs/extract/annotation.py index 0baefbb..a12dec8 100644 --- a/pubs/plugs/extract/annotation.py +++ b/pubs/plugs/extract/annotation.py @@ -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) diff --git a/pubs/plugs/extract/extract.py b/pubs/plugs/extract/extract.py index c513813..e5c356d 100644 --- a/pubs/plugs/extract/extract.py +++ b/pubs/plugs/extract/extract.py @@ -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", " ")