# Automatic Processing of Historical Japanese Mathematics (Wasan) Documents
## 1 Introduction  
\"Wasan\" (\(\mathbb{f}\)!)! is a type of mathematics that was uniquely developed in Japan during the Edo period (1603-1898). The general public (samurai, merchants, farmers) learned a type of mathematics developed for people to enjoy, and Wasan documents have been used by Japanese citizens as a mathematics study tool or as a mental training hobby ever since [1, 2]. These mathematics were studied from a completely different perspective from the mathematics learned in the West at the time and, in particular, did not have application goals [3]. The fact of Japan's close commercial exchanges with western countries in this period resulted in these \"Galapagos\" mathematics that have made it to our days in a series of \"Wasan books\". The most famous Wasan book is \"Jinkokuki\", published in 1627 with a popularity [4] that resulted in many pirated versions of it being produced. Three ranks exist in Wasan, depending on the difficulty of the concepts and calculations involved in them. * The basic rank deals with basic calculations using the four arithmetic operations. Mathematics in this level correspond to those necessary for daily life. * The intermediate rank considers mathematics as a hobby. Students of this rank learn from an established textbook (one of the aforementioned \"Wasan books\") and can receive diplomas from a Wasan master to show their progress. * The highest rank corresponds to the level of Wasan masters who were responsible for the writing of Wasan books. These masters studied academic content at a level comparable to Western mathematics of the same period. By examining Wasan books, we can learn about this form of not only social, but also advanced mathematics developed uniquely in Japan. Geometric problems are common in Wasan books (see, for example [5]). It is said that the people who saw beautiful figures in Wasan books and understood the complicated calculations they conveyed felt a great sense of exhilaration. These feelings of joy produced by learning mathematics exemplify why, even today, people continue to learn Wasan and practice it as a hobby. We will focus in this subset of Wasan documents, including geometric problems. This paper belongs to a line of research aiming to construct a document database of Wasan Documents. Specifically, we continue the work started in [6,7] to develop computer vision and deep learning (from now on CV and DL) tools for the automatic analysis of Wasan documents. The information produced by these tools will be used to add context information to the aforementioned database so users will be able to browse problems based on their geometric properties. A motivation for this work is to address the problem of the aging of researchers within the Wasan research area. Estimations indicate that, as current scholars retire, the whole research area may disappear within 15 years. Thus, we set out to make the knowledge of traditional Wasan scholars available for young researchers and educators in the form of an online-searchable context-rich database. We believe that such a database will result in new insights into traditional Japanese mathematics. The documents considered in this study are composed of a diagram accompanied by a textual description using handwritten Japanese characters known as _Kanji_ (see Figure 1 for an example). In this paper, we focus on two main aspects of their automatic processing:  
* The description of the problem (problem statement) written in Edo period Kanji. Extracting this description would amount to (1) determining the regions of Wasan documents containing kanji, (2) recognizing each individual Kanji. Completing both steps would allow us to present documents along with their textual description and use automatic translation to make the database accessible to non-Japanese users. * Determining the location of the particular kanji called \"ima\". The description of all problems starts with the formulaic sentence \"Now, as shown,\"\".