textualize/entities/ProcessedText.go
Yehoshua Sandler 1631271b93
Replace native canvas implementation with Konva library (#2)
* style: spelling

* refact: canvases replaced with konva

* refact: area text calculated by words

* refact: moved konva files out of test dir
2023-06-27 08:42:44 -05:00

49 lines
1.2 KiB
Go

package entities
type ProcessedBoundingBox struct {
X0 int32 `json:"x0"`
Y0 int32 `json:"y0"`
X1 int32 `json:"x1"`
Y1 int32 `json:"y1"`
}
type ProcessedSymbol struct {
Text string `json:"text"`
Confidence float32 `json:"confidence"`
BoundingBox ProcessedBoundingBox `json:"boundingBox"`
}
type ProcessedWord struct {
Id string `json:"id"`
FullText string `json:"fullText"`
Symbols []ProcessedSymbol `json:"symbols"`
Confidence float32 `json:"confidence"`
Direction string `json:"direction"`
BoundingBox ProcessedBoundingBox `json:"boundingBox"`
}
type ProcessedLine struct {
Words []ProcessedWord `json:"words"`
}
type ProcessedArea struct {
Id string `json:"id"`
DocumentId string `json:"documentId"`
Order int `json:"order"`
Lines []ProcessedLine `json:"lines"`
}
type ProcessedTextCollection struct {
Areas []ProcessedArea
}
type ProcessedUserMarkdown struct {
Id string `json:"id"`
DocumentId string `json:"documentId"`
Value string `json:"value"`
}
type ProcessedUserMarkdownCollection struct {
Values []ProcessedUserMarkdown `json:"values"`
}