We proposed a framework for assisting the human
process for reading Japanese historical manuscripts
by employing constraint solving (Arai et al., 2013). A
sequence of characters is constrained to form a valid
word in a dictionary for historical Japanese. The over-
all structure of the framework is shown in Fig.2. It
consists of two major subsystems: a character recog-
nizer and a constraint solver. The character recognizer
segments an input image into characters, determines
hiragana candidates for the segmented characters, and
constructs a CSP based on the determined candidates.
Then the constraint solver solves the CSP by assign-
ing possible reading using a word dictionary. Then
the result of the constraint solving is returned to the
character recognizer to revise recognition. This feed-
back is repeated if necessary. The system finally out-
puts the assigned reading.
Technical issues of the proposal are divided into
two categories: one is image recognition, and the
other is constraint solving. In the former issues, we
have to think of extracting an image containing just
one historical Hiragana from the original image of,
for example, a page, and using the effective method
to recognize an extracted historical Hiragana. In the
latter issues, we have to think of the method of model-
ing of reprinting as a CSP, and the method of efficient
constraint solving.
We focused on the constraint solving issue and
experimentally implemented a backtrack-based con-
straint solver for Reprint-CSPs. The solver is for
reading Japanese historical manuscripts using hira-
gana, and finds maximally better solutions accord-
ing to a solution comparator called locally-predicate-
better (Borning et al., 1992). The solving process is a
kind of morphological analysis. Because of an insuf-
ficient branch-and-bound pruning, it can not suppress
combinatorial explosion.
We then implemented a minimum-cost-method-
based solver as a successor of the backtrack-based
solver (Watanabe et al., 2015). Given a CSP, a dic-
tionary and an positive integer n, it extracts better ad-
missible solutions according to the locally-predicate-
better comparator from n-best admissible solutions
according to solution cost. The solver employs the
A
∗
algorithm to avoid combinatorial explosion.
Both the backtrack-based solver and the
minimum-cost-method-based solver are imple-
mented in Ruby and are invoked as commands from
character user interface.
Figure 2: System Configuration.
4 REPRINT CONSTRAINT
SATISFACTION PROBLEM
We redefine the CSP for reading historical kana text,
which we call the Reprint-CSP, because the definition
in (Watanabe et al., 2015) does not fit the CSP which
the minimum-cost-method-based solver deals with.
A Reprint-CSP consists of the following seven
components.
• a finite number of variables
• variables’ domains
• a directed acyclic graph (DAG) over the variables
• a word dictionary
• explicitly-given constraints
• a word occurrence cost function
• a connectivity cost function
Each variable corresponds to a segmented char-
acter on a historical text image which contains one
character. Because of complex shapes of historical
kana characters, the character recognizer may not be
able to determine if a segmented image corresponds to
one or more characters. In such a case, the character
recognizer enumerates possible cases. As a result, a
segmented character corresponding to a variable may
overlap segmented characters corresponding to differ-
ent variables.
Fig.3 shows an image of a Japanese historical text
consisting of five characters taken from Tale of Ise
(Reizei, 1994), and a Reprint-CSP constructed from
the text. The DAG of Fig.3 represents reading or-
der among segmented characters. A variable x
1
is as-
signed to the first character. Similarly, variables x
2
,
x
5
, x
6
and x
7
are assigned to the 2nd, the 3rd, the 4th,
and the 5th character respectively. However, the sec-
ond character can be recognized as a combination of
two characters. For this reason, two variables x
3
and
x
4
are assigned to the two characters.
The domain of each variable is a finite set of pos-
sible kana for the segmented character because it is
difficult to determine a unique kana for a segmented
character.
A Constraint Solving Web Service for Recognizing Historical Japanese KANA Texts
259