mattermost-community-enterp.../vendor/github.com/otiai10/gosseract/v2/hocr.go
Claude ec1f89217a Merge: Complete Mattermost Server with Community Enterprise
Full Mattermost server source with integrated Community Enterprise features.
Includes vendor directory for offline/air-gapped builds.

Structure:
- enterprise-impl/: Enterprise feature implementations
- enterprise-community/: Init files that register implementations
- enterprise/: Bridge imports (community_imports.go)
- vendor/: All dependencies for offline builds

Build (online):
  go build ./cmd/mattermost

Build (offline/air-gapped):
  go build -mod=vendor ./cmd/mattermost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:59:07 +09:00

50 lines
1.2 KiB
Go

package gosseract
/**
* NOTE:
* These structs are the very minimum implementation
* only to satisfy test assertions.
* TODO: Extend structs to cover main usecases.
**/
// Page represents `<div class='ocr_page' />`
type Page struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Class string `xml:"class,attr"`
Content Content `xml:"div"`
}
// Content represents `<div class='ocr_carea' />`
type Content struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Class string `xml:"class,attr"`
Par Par `xml:"p"`
}
// Par represents `<p class='ocr_par' />`
type Par struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Class string `xml:"class,attr"`
Language string `xml:"lang,attr"`
Lines []Line `xml:"span"`
}
// Line represents `<span class='ocr_line' />`
type Line struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Class string `xml:"class,attr"`
Words []Word `xml:"span"`
}
// Word represents `<span class='ocr_word' />`
type Word struct {
ID string `xml:"id,attr"`
Title string `xml:"title,attr"`
Class string `xml:"class,attr"`
Characters string `xml:",chardata"`
}