1. A method comprising steps performed by one or more processors, the steps comprising: a) fragmenting a set of at least one training ink stroke to form a plurality of fragments, at least two of the fragments forming a compound object represented by at least one of the training ink strokes; b) labeling each of the plurality of fragments with a single label, the label for each of the at least two of the fragments forming a compound object indicating a coarse label of the compound object; c) constructing a first neighborhood graph as a hidden random field comprising a plurality of nodes, a plurality of hidden nodes, and zero or more edges connecting two or more hidden nodes, each node of the first graph being associated with a single fragment, and at least one hidden node being associated with each node; d) constructing a site potential including at least a first portion of a set of modeling parameters, the site potential being based on at least one site feature for each hidden node; e) constructing an interaction potential including at least a second portion of the set of modeling parameters, the interaction potential being based on at least one interaction feature for each edge; f) constructing a part-label interaction potential including at least a third portion of the set of modeling parameters, the part-label interaction potential being based on at least one part-label interaction feature for each hidden node; g) optimizing the set of modeling parameters to increase a posterior conditional probability of the labels given the plurality of fragments based on the at least one site feature for each hidden node, the at least one interaction feature for each edge, and the at least one part-label interaction for each hidden node; and h) storing a training model including the set of modeling parameters in a computing device.