Documentation
¶
Overview ¶
Package docxparse parses LarkOpenCLI DocxXML into a small DOM for the docs +script shortcut.
Index ¶
Constants ¶
const ( MaxInputBytes = 20_000_000 MaxNestingDepth = 1024 )
Variables ¶
This section is empty.
Functions ¶
func IsPresentationBlockType ¶
IsPresentationBlockType reports whether tag is both counted by the profile and suitable for a Presentation Decision block plan. The centralized catalog keeps planning policy independent from individual component fields.
Types ¶
type BlockShare ¶
type BlockShare struct {
}
BlockShare reports one LarkOpenCLI block type's count and share. Structural and inline-only tags are intentionally excluded.
type Format ¶
type Format string
Format is an accepted source document format.
const (
FormatXML Format = "xml"
)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is the internal DocxXML DOM representation.
type ParseResult ¶
type ParseResult struct {
Format Format `json:"format"`
XML string `json:"xml"`
Profile Profile `json:"profile"`
}
ParseResult is the complete result returned by Parse.
type Profile ¶
type Profile struct {
WordCount int `json:"word_count"`
CharCount int `json:"char_count"`
Breakdown TextBreakdown `json:"breakdown"`
BlockCount int `json:"block_count"`
Blocks []BlockShare `json:"blocks"`
}
Profile describes LarkOpenCLI document structure and visible text without requiring callers to inspect the full XML.
func ParseCompatibleXML ¶
ParseCompatibleXML builds a profile after deterministic recovery of common malformed XML emitted while authoring a draft.
type TextBreakdown ¶
type TextBreakdown struct {
HanChars int `json:"han_chars"`
EnglishWords int `json:"english_words"`
NumberWords int `json:"number_words"`
ChinesePunctuations int `json:"chinese_punctuations"`
EnglishLetters int `json:"english_letters"`
Digits int `json:"digits"`
EnglishPunctuations int `json:"english_punctuations"`
SymbolWords int `json:"symbol_words"`
SymbolChars int `json:"symbol_chars"`
}
type TextProfile ¶
type TextProfile struct {
WordCount int `json:"word_count"`
CharCount int `json:"char_count"`
Breakdown TextBreakdown `json:"breakdown"`
}
TextProfile is the internal result of the LarkOpenCLI semantic counter.