Quick Start Guide
First, make sure you've installed the package.
Creating IDS Graphs
The package mainly revolves around the IDSGraph
struct and operations on it. This graph has character components as vertices, with an edge from component A to component B if B is a subcomponent of A. If you call the no-parameter constructor, we just get an empty graph
using IDSGraphs
IDSGraph()
IDSGraph(Graphs.SimpleGraphs.SimpleDiGraph{UInt32}(0, Vector{UInt32}[], Vector{UInt32}[]), Dict{Char, UInt32}(), Char[], Dict{Char, IDSGraphs.AbstractCharStructure}())
However, this isn't that useful, as we'd have to construct all the relationships ourselves. IDSGraphs can also load a default graph based on data from the CHISE project (this is not licensed under the same MIT license as the code). You can pass a symbol for which dataset to load, for several "default" datasets. Otherwise, you can load an IDS file from disk as well.
IDSGraph(:ids)
IDSGraph(Graphs.SimpleGraphs.SimpleDiGraph{UInt32}(216989, Vector{UInt32}[[0x000081bf, 0x00008a14], [0x00007a95], [0x00007139, 0x0000de75, 0x0001479f], [0x0000004b, 0x00000066, 0x000000ab, 0x000000c6, 0x00000194, 0x000004ea, 0x000004f3, 0x00000617, 0x0000064f, 0x00000678 … 0x00014f45, 0x00014fff, 0x0001506a, 0x0001529b, 0x000152b7, 0x000152bc, 0x00015683, 0x00015882, 0x00015a31, 0x00015ab8], [0x0000004a, 0x0000006e, 0x000000ac, 0x00000121, 0x000002c5, 0x000005a3, 0x0000078e, 0x0000089a, 0x000008a3, 0x00000a3f … 0x00014b31, 0x0001509a, 0x000150cd, 0x00015193, 0x00015307, 0x000154bd, 0x0001550e, 0x00015959, 0x0001595a, 0x0001595b], [0x00000062, 0x00000076, 0x0000011f, 0x00000130, 0x0000014c, 0x0000021f, 0x0000037e, 0x0000049e, 0x0000057d, 0x000006c8 … 0x00014ab9, 0x00014b4f, 0x00014c53, 0x00014e8f, 0x000152f3, 0x00015322, 0x000157b5, 0x0001591d, 0x00015a17, 0x00015aba], [0x00000339, 0x000003b2, 0x00000406, 0x00000439, 0x000004c2, 0x000004f5, 0x00000605, 0x0000060e, 0x0000072f, 0x000007d4 … 0x00014cd4, 0x00015085, 0x000151d4, 0x00015246, 0x00015394, 0x000154e5, 0x000155cb, 0x0001598d, 0x000159ac, 0x00015aef], [0x00000125, 0x00000399, 0x000003a6, 0x0000048d, 0x000004c2, 0x000008ab, 0x00000b4c, 0x00000c07, 0x00000f4f, 0x00001a15 … 0x000152b4, 0x000152b6, 0x000152bb, 0x000152bf, 0x000152c3, 0x0001542e, 0x00015822, 0x000158a7, 0x00015a3c, 0x00015b74], [0x000005b9, 0x000005dc, 0x000008ab, 0x00000b8e, 0x00000bcb, 0x00000c91, 0x00001182, 0x00001345, 0x0000135b, 0x000013e6 … 0x00013e99, 0x0001426d, 0x00014420, 0x000149b9, 0x00014af3, 0x00014de1, 0x00014ed6, 0x0001557e, 0x000156a6, 0x00015873], [0x000004dc, 0x000004f9, 0x0000053d, 0x000005e4, 0x00000bbb, 0x00000f4d, 0x00000f54, 0x000017cf, 0x000020fd, 0x00005321 … 0x00013d8f, 0x00013e90, 0x000140b1, 0x00014100, 0x0001416c, 0x000142dd, 0x0001497c, 0x000149d2, 0x00014f19, 0x0001559b] … [], [], [], [], [], [], [], [], [], []], Vector{UInt32}[[], [], [], [], [], [], [], [], [], [] … [0x000011ad, 0x000013e6], [0x000009c2, 0x00000ea9], [0x00000a43, 0x000025fe], [0x00002602, 0x00006d65], [0x00000008, 0x00001bec], [0x00000380, 0x00000567], [0x0000013a, 0x000020fd], [0x00002e20, 0x00007463], [0x000009d4, 0x0000537c], [0x00000382, 0x00000c6f]]), Dict{Char, UInt32}('𩖳' => 0x0001058f, '䉹' => 0x00006294, '𨢔' => 0x0000f88d, '𣺌' => 0x0000af0d, '𦫥' => 0x0000db0d, '𢌓' => 0x00009355, '𧥢' => 0x0000e983, '𩭇' => 0x00010b1a, '𠚧' => 0x00007674, '蘬' => 0x00003bd9…), ['α', 'ℓ', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧' … '𪈎', '𪊑', '麻', '䵖', '黹', '鼅', '鼏', '鼖', '鼻', '𪘀'], Dict{Char, IDSGraphs.AbstractCharStructure}('𩖳' => Component('之'), '䉹' => Component('靈'), '𨢔' => Component('日'), '𣺌' => Component('𦕈'), '𦫥' => Component('色'), '𢌓' => Component('邑'), '𧥢' => Component('言'), '𩭇' => Component('里'), '𠚧' => Component('刂'), '蘬' => Component('歸')…))
Check the documentation for the constructor for supported symbols. These will be downloaded the first time as an artifact.
The license for this package is MIT, meaning that you are free to use it as you wish. However, the data sets that the package can pull from may have various licenses! These licenses are generally not as permissive, so you should check the license for specific IDS data sets you wish to use.
You can also construct a graph from an IDS file on disk by passing in a filename
julia> IDSGraph("local/path/to/file/custom-ids.txt")