This was another case of someone trying to put a square peg in a round
hole, the outer group of 0548e.svg didn't contain one of the child
elements and its position also didn't make much sense.
Whoever made the KanjiVG groups originally often insisted on plugging
in ill-matching groups like 仁 in characters like these. I don't want
to remove these willy-nilly but if these things must be added, at
least they should be added so they don't disrupt the actual structure
of the character. This splits the 仁 bit into two parts and makes it
no longer the "master group" of this character.
Most of the non-kanji graphics except for マ did not have a
kvg:element on the outermost group of the stroke paths. This adds the
Unicode value as kvg:element.
Where the left stroke was labelled ㇑/㇒, it's been relabelled as ㇑,
CJK Stroke S. This label seems to have been intended to indicate that
the stroke was vertical but could be bent in some cases, but its used
was inconsistent, so I decided to remove it.
Where the left stroke was labelled ㇒, two actions were taken
depending on the properties of the stroke.
Where the stroke appeared to bend left at the bottom, the stroke was
relabelled ㇓, CJK Stroke SP, which is the correct stroke type for
this according to the documentation available.
Where the stroke appeared to be straight at the bottom and vertical,
the stroke was relabelled ㇑, CJK Stroke S. (Some of the strokes had a
small kink at the top.)
All of the files in the second case had "Kaisho" in the file name,
except for one exception, 0745c-VtLst.svg.
This automatically changes a number of cases where the bottom part of
an 青 element was written using an 円 kanji but marked as 月 in the
group with a subgroup of 円 to using a single group with 月 as the
original value and 円 as the element value, without a subgroup.
None of these groups was a radical or otherwise seemed to require
special treatment.
This does some more cases where the file has two joined groups.
The script which does this work is not very sophisticated, so it was
necessary to run it twice for cases there were two instances of groups
which should be joined.
I also ran it a third time, but there were no cases of three sets of
groups like this.
Some of the files had two groups with part=1 part=2 with the same
element next to each other. This removes all such groups, and also
renumbers the succeeding parts of the group where they exist
Add the new position value "tarec".
Most of this change could be done automatically either just by adding
the position to the obvious counterpart, or by grouping the other
elements into one thing and then giving that new group a "tarec"
position.
There were some exceptional cases where "tare" had been added to the
parent of the actual tare element. There was one very weird case
081ba.svg where the grouping was too eccentric to be able to keep, so
I removed the inner groups.
066f2-KaishoVtLst had a different Nelson radical than 066f2.svg
Two or three strokes in kanji files were missing kvg:type information
completely.
Two or so attributes were mis-ordered
This file seems to be just a list of the CJK stroke types from
Unicode. Further, it includes various simplified Chinese strokes which
don't occur in KanjiVG, so presumably it was never checked against the
data.
Most of this is automatically edited. About 300 cases were simple
addition of the nyoc group to whichever of a pair of groups lacked the
position element, then about 50 or so cases were re-grouping of the
counterpart elements into a single group and adding the nyoc position,
and then there were a few cases such as 051a0.svg of grouping errors
in the existing files, where the nyo counterpart had falsely been made
a child of the nyo group which had to be hand edited.
There were no other types of errors as far as I could see, and this
now covers every case of "nyo" position in the kanji directory.
Also remove a lot of small groups containing only one path which
seemed to have caused the creator of this file much confusion.
Also put the Nelson radical on the correct stroke
This uses a script to remove all of the duplicate radicals. I spot
checked the geometry, and it seems that the first group is always the
right one to keep, because of the stroke order, so I just removed all
the other radical values on groups except the first one. I did not
actually go to the trouble of sorting the geometries in order since
there didn't seem to be any exceptions to the "first is upper left"
rule.
Change radical variant to ⻞ where appropriate
Otherwise change the radicals to the correct variant or otherwise fix
grouping errors related to radicals and their expected stroke count.