Character Structures
IDS files use Unicode ideographic description characters to describe how components of characters are put together (they occupy the range from U+2FF0 to U+2FFB). In IDSGraphs.jl, these relationships are represented as character structures, similar to a parse tree.
IDSGraphs.parse
— MethodIDSGraphs.parse(::AbstractString)
Parse a single IDS string that describes a character/component's decomposition. (This function does not do any input validation to verify that the string can actually represent a decomposition; in this case, the method will fail silently.)
This is a relatively low-level method; you typically do not need to call this directly, but it is available if you are parsing your own IDS strings.
Examples
We can take the IDS string itself and parse it as a nested structure.
julia> using IDSGraphs: parse
julia> parse("⿱此二")
CharStructure{TopBottomStructure}(TopBottomStructure(Component('此'), Component('二')))
Structure Hierarchy
IDSGraphs.AbstractCharStructure
— TypeSupertype for character structures.
IDSGraphs.NestedStructure
— TypeSupertype for structures/relationships that are "nested" (one component within the other, touching at least 2 sides).
IDSGraphs.Component
— TypeLeaf node of a structure tree; this contains a single component.
Component(char)
Basic Relationships
These are the simplest component relationships: components are all either horizontally or vertically stacked on top of each other, in a set of 2 or 3 components.
IDSGraphs.LeftRightStructure
— TypeThis structure reflects the ⿰ relationship.
LeftRightStructure(leftComponent, rightComponent)
IDSGraphs.TopBottomStructure
— TypeThis structure reflects the ⿱ relationship.
TopBottomStructure(topComponent, bottomComponent)
IDSGraphs.VerticalThirdsStructure
— TypeThis structure reflects the ⿲ relationship.
VerticalThirdsStructure(leftComponent, middleComponent, rightComponent)
IDSGraphs.HorizontalThirdsStructure
— TypeThis structure reflects the ⿳ relationship.
HorizontalThirdsStructure(topComponent, middleComponent, bottomComponent)
Nested Relationships
Most relationships have one component in the "middle" with another component "around" the middle component. The names reflect where the middle component is placed.
Note that not all of the expected positions are covered. There is no
LeftNestedStructure
TopLeftNestedStructure
IDSGraphs.CenterNestedStructure
— TypeThis structure reflects the ⿴ relationship.
CenterNestedStructure(innerComponent, outerComponent)
IDSGraphs.BottomNestedStructure
— TypeThis structure reflects the ⿵ relationship.
BottomNestedStructure(innerComponent, outerComponent)
IDSGraphs.TopNestedStructure
— TypeThis structure reflects the ⿶ relationship.
TopNestedStructure(innerComponent, outerComponent)
IDSGraphs.RightNestedStructure
— TypeThis structure reflects the ⿷ relationship.
RightNestedStructure(innerComponent, outerComponent)
IDSGraphs.BottomRightNestedStructure
— TypeThis structure reflects the ⿸ relationship.
BottomRightNestedStructure(innerComponent, outerComponent)
IDSGraphs.BottomLeftNestedStructure
— TypeThis structure reflects the ⿹ relationship.
BottomLeftNestedStructure(innerComponent, outerComponent)
IDSGraphs.TopRightNestedStructure
— TypeThis structure reflects the ⿺ relationship.
TopRightNestedStructure(innerComponent, outerComponent)
Overlap Relationship
There's one more relationship different from all the others:
IDSGraphs.OverlapStructure
— TypeThis structure reflects the ⿻ relationship.
OverlapStructure(frontComponent, backComponent)