Add distance calculation information to docstrings
This commit is contained in:
parent
bb2340fce1
commit
fc051ed49e
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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", " ")
|
||||
|
|
Loading…
Reference in a new issue