@@ -96,7 +96,8 @@ def to_common(self) -> Line:
9696 def from_common (cls , line : Line ,
9797 classifications : List [ClassificationAnnotation ], name : str ,
9898 feature_schema_id : Cuid , extra : Dict [str , Any ],
99- data : Union [ImageData , TextData ]) -> "NDLine" :
99+ data : Union [ImageData , TextData ],
100+ confidence : float ) -> "NDLine" :
100101 return cls (line = [{
101102 'x' : pt .x ,
102103 'y' : pt .y
@@ -105,7 +106,9 @@ def from_common(cls, line: Line,
105106 name = name ,
106107 schema_id = feature_schema_id ,
107108 uuid = extra .get ('uuid' ),
108- classifications = classifications )
109+ classifications = classifications ,
110+ confidence = confidence
111+ )
109112
110113
111114class NDFrameLine (VideoSupported ):
@@ -340,7 +343,7 @@ class Location(BaseModel):
340343 end : int
341344
342345
343- class NDTextEntity (NDBaseObject ):
346+ class NDTextEntity (NDBaseObject , ConfidenceMixin ):
344347 location : Location
345348
346349 def to_common (self ) -> TextEntity :
@@ -350,7 +353,9 @@ def to_common(self) -> TextEntity:
350353 def from_common (cls , text_entity : TextEntity ,
351354 classifications : List [ClassificationAnnotation ], name : str ,
352355 feature_schema_id : Cuid , extra : Dict [str , Any ],
353- data : Union [ImageData , TextData ]) -> "NDTextEntity" :
356+ data : Union [ImageData , TextData ],
357+ confidence : float
358+ ) -> "NDTextEntity" :
354359 return cls (location = Location (
355360 start = text_entity .start ,
356361 end = text_entity .end ,
@@ -359,7 +364,9 @@ def from_common(cls, text_entity: TextEntity,
359364 name = name ,
360365 schema_id = feature_schema_id ,
361366 uuid = extra .get ('uuid' ),
362- classifications = classifications )
367+ classifications = classifications ,
368+ confidence = confidence
369+ )
363370
364371
365372class NDObject :
0 commit comments