The calculation of margin loss could be regarded as to count the number of incorrectly segmented characters and then multiple it with a fixed discount parameter for smoothing.
the loss is proportional to the number of incorrectly segmented characters.