COMPUTERIZATION OF THE THAMMASAT VERSION OF
THE KOTMAI TRA SAM DUANG
The Kotmai Tra Sam Duang or the Laws of the Three Seals
The Kotmai Tra Sam Duang (hereafter Abbreviated as KTSD) is a popular
appellation given to a corpus of traditional laws of Thailand compiled
in 1805 by the order of King Rama I of the reigning Chakri Dynasty.
The importance of the KTSD lies in the fact that it is virtually the
single source for those who wish to study the pre-nineteenth century
legal texts of Thailand. It is generally accepted that the Ayutthayan
royal archives were almost completely destroyed when the old capital
was sacked by the invading Burmese army in 1767. In fact, it is stated
in a royal decree issued in 1794 that only a ninth or tenth of the Ayutthayan
code of laws survived the catastrophe brought by the Burmese invasion.
'Phraratchakamnot Mai 28' King Rama I who ascended the throne in Bangkok
in 1782., should have felt necessary to review the existing legal texts
which obviously were not only far from complete but also should have
understandably been corrupted in the war-stricken confusion.
The preamble of the KTSD refers to a divorce case which eventually came
to reveal the inappropriate state the existing legal texts. This led
the king to order a prompt and total "cleansing" or kaan chamra
or the corpus of laws. The task was commissioned to a group of specialists
who started the operation on January 31, 1805 and ended, it is believed,
either on September 3rd December 16th of the same year. It look, therefore,
nine or eleven months depending on which is to be taken as the of its
completion. the results of this enterprise can be seen today in the
from of Chabap Luang or the Royal Copy of the KTSD. This Royal Copy
is said to have been made in three sets, each consisting of forty-one
volumes of samut khoi. They were kept in Ho Khruang. Sanluang samrap
Lukkhun, and Ho Luang, respectively. Besides, another copy known today
as Chabap Rongsong or a secondary copy was produced.
Due to unknown reasons, however, all of these copies seem to have scattered
and lost by 1980, when a systematic attempt was made to reclaim the
missing copies. As a result, 80 volumes of Chabap Luang and 17 volumes
of Chabap Rongsong were recovered. Thus we are able today to have some
idea as to how the whole the whole corpus originally looked like.
As is well known, the name KTSD or Three Seals Law is derived from the
fact that on each volume of the corpus are stamped all three official
seals the Ministers of the North, the South and the Central, who were
respectively in charge of the three provincial divisions constituting
the traditional kingdom of Thailand. The impression of the three seals
may be taken as indicative of its universal application within the realm.
Furthermore the exclusive nature of the corpus is indicated in such
a statement found in the Preamble that from thenceforth any text without
the Three Seals should never be used in the administration of justice.
It is not unlikely that all of pre-KTSD legal text should have been
left abandoned at the time of or after the completion of the whole corpus,
if not intentionally been destroyed. So far no legal text predating
the KTSD is reported to be in existence.
It is regretful that little is known today about the actual process
of the 'cleansing" in 1805 A.D.. But considering the relative shortness
of time spent to finish the whole operation.. it seems unlikely thet
the whole texts under examination be completely rewritten. More likely
is the case in which the texts should have undergone partial revision
by way of interpolation, omission, addition, renovation, etc... This
being the case,the finished work should most probably retain not a small
of the original features. Without pre-KTSD urtext in hand, however,
it is not easy a task to delineate the modified portions from the original
ones. It may be hoped that the internal text critique methodology, if
properly applied, could reveal the complex structure of the KTSD texts.
And for this, a comprehensive index of total glossary, if any, must
be extremely useful. It is with this convicion in mind that a computreization
project of the whole text was planned and launched in 1978 at the National
Museum of Ethnology where I then held a position of visiting professor
Before going into the detail of project, let me describe the structure
of the KTSD.
The original corpus which is said to have 1,603 matras, consists of
the following titles. For convenience sake they are grouped into the
following four groups:
|The Preamble and Phrathammasat
| Kotmonthienban I
Tamnaeng Na Phonlaruan
Tamnaeng Na Thahan Huamuang
Phisut Damnam Luiphloeng (no pail quotation)
Laksana Phua Mia I
Laksana Phua Mia II
Laksana Ku Ni
Laksana Wiwat Tidakan
Laksana Chon I
Laksana Chon II
Aya Luanf I
Aya Luanf II
|Kot Phrasong I
Kot Phrasong II
Kot Samsip Hok Kho
Phraratchakamnot Kau I
Phraratchakamnot Kau II
Phraratchakamnot Kau III
Phraratchakamnot Kau IV
Phraratchakamnot Kau V
Phraratchakamnot Mai I
Phraratchakamnot Mai II
Phraratchakamnot Mai III
Phraratchakamnot Mai IV
Phraratchakamnot Mai V
"Group 1" contains (1) Preamble, (2)Phrathammasat, and (3)
Inthaphat of which Phrathammasat provides with an inventory to the subsequent
"laksana" or titles. A legend of Manosan found in Phrathammasat
is to give authority to whole texts.
"Groug 2" which lacks the Pall introduction as fonud in the
texts of "Group 3" seems to require separate treatment.
"Group 3" are a body of laws, known as "laksana".
Each "laksana" is usually prefaced by a pail sentence, the
corresponding Pail of which is to be found in Phrathammasat.
"Group 4" are royal decrees promulgated by kings of late Ayutthyan
and Thonburi-Bangkok periods covering the period the between 1527 through
First, the problem of eras used in different texts of the corpus. Many
have been said about sakarat or era used in KTSD. In addition to the
most commonly used Chulasakarat, are found Mahasakarat as well as Phutthasakrat.
Beside, there is another era for which interpretations have been proposed.
It is called Sakrat Kotmai by Prince Damrong, while Phiphat called it
Chulamanisakarat. However, both are, rightly or wrongly, refuted by
Chit Phumisak who believed that it be no other than Mahasakarat. Secondly,
it is to be noted that there is no guarantee that any sakarat shown
in a given text should correspond to the date when the text in question
was actually made. This is easily seen from an example taken from one
matra of Phrathammanun which refers to Krung Kao. The said matra is
in the section of the laksana dated 1743 A.D. A.D., if the era being
Chulamanisarat, or 1633 A.D., if it be Mahasakarat. In neither case,
reference to Krung Kao which must be the appellation of the old capital
of Ayutthaya is unnatural and must be an interpolation in a later age.
Not a few examples of other interpolations, charges, additions etc.
can easily be pointed out.Thirdly stylistic differences in the time
of composition to the given texts or in provenance of the given texts.
These problems shall be more appropriately approached if a relevant
tool which should enable us to make comprehensive cross reference of
the whole texts.
Computerization of the KTSD: an attempt to a KWIC Index
The computerization project of the KTSD was planned and started for
the first time in 1978 at the National Museum of Ethnology, Suita, Osaka.
A study group was organized at the laboratory of Dr,Shigeharu Sugita,
Associate Professor of Computer Science with a wide participation of
computer scientists and Thai language specialists.
A problem of segmentation
Before being input to a computer, a text must be properly segmented.
At first sight, the segmentation of the Thai text seems to have no problem.
But as the project went on, it was found that the operation was not
as easy as it was thought at the beginning. In fact, even after nearly
ten years of trail and error, we are still unable to claim that all
problems have been solved.
Compared with such language as Sanskrit in which the law of snadhi often
disguises the appearance of juxtaposed vowels, segmentation of Thai
where each word retains its distinct from in a sentence, hardly causes
But it soon came to be noticed that with mechanical segmentation alone
linguistically satisfactory results were difficult to be reached.At
the same time, how a given word be segmentation often depends upon the
need of a user of the index which is one of the most important aims
of the computerization of the KTSD. While a lexicographer may be concerned
about frequency of use of such simple word as "ko", "dai",
"laew", "pai", "ma",etc., a historian
shall be more interested in such a combined expression as not easily
be bridged by a single principle for segmentation of words.
A KWIC index and its problem
KWIC is the abbreviation of a method of index production. In this system,
a chose word always appears at the center of CRT, being sandwiched by
preceding and following chains of words. The length of one line is determined
by the size of a given CRT and nothing to do with the meaning of the
sentence or sentences of which the indicated word constitutes a part.
For the users of the index, this is not always the best way of actually
appears is not necessarily an appropriate one.
Oftentimes unnecessary content is given, while proper content is outside
the frame of the CRT.
In the revised version which is almost completed by now, the KWIC has
been replaced by another method which is widely adopted by conventional
maker of a concordance, for example, Bible concordance, Sahkespere concordance,
etc.,: namely, a word is accompanied by a complete sentence in which
In order to reduce the size of the index, a device is worked out. For
the words whose frequency is extremely high, only its location is indicated
without giving its context at all. In this, we have followed a well
designed computer index the Greek new testament published in 1983 in
It is hoped that our new KTSD Index may be reduced in its size from
the original 70 volumes to 3 volumes of manageable thickness.