textualize/entities/ProcessedText.go
Yehoshua Sandler c49f8e4d07
refact: generalized back end structs (#1)
* refact: generalized back end structs

* refact: fixed front end type, removed dead code

* removed test image folder

* refact: removed dead structs
2023-05-26 19:23:35 -05:00

51 lines
1.3 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 {
FullText string `json:"fullText"`
Words []ProcessedWord `json:"words"`
}
type ProcessedArea struct {
Id string `json:"id"`
DocumentId string `json:"documentId"`
FullText string `json:"fullText"`
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"`
}