|
|
@ -4,7 +4,7 @@ import re
|
|
|
|
import unicodedata
|
|
|
|
import unicodedata
|
|
|
|
from contextlib import suppress
|
|
|
|
from contextlib import suppress
|
|
|
|
from itertools import repeat
|
|
|
|
from itertools import repeat
|
|
|
|
from typing import Optional
|
|
|
|
from typing import List, Optional
|
|
|
|
|
|
|
|
|
|
|
|
import attr
|
|
|
|
import attr
|
|
|
|
import numpy as np
|
|
|
|
import numpy as np
|
|
|
@ -135,7 +135,7 @@ class ExtractedText:
|
|
|
|
segments = attr.ib(type=Optional[list], converter=attr.converters.optional(list))
|
|
|
|
segments = attr.ib(type=Optional[list], converter=attr.converters.optional(list))
|
|
|
|
joiner = attr.ib(type=Optional[str])
|
|
|
|
joiner = attr.ib(type=Optional[str])
|
|
|
|
_text = attr.ib(type=Optional[str])
|
|
|
|
_text = attr.ib(type=Optional[str])
|
|
|
|
_grapheme_clusters = attr.ib(type=Optional[list[str]])
|
|
|
|
_grapheme_clusters = attr.ib(type=Optional[List[str]])
|
|
|
|
|
|
|
|
|
|
|
|
@segments.validator
|
|
|
|
@segments.validator
|
|
|
|
def check(self, _, value):
|
|
|
|
def check(self, _, value):
|
|
|
|