scrp-tha.lua /size: 2021 b    last modification: 2020-07-01 14:35
1if not modules then modules = { } end modules ['scrp-tha'] = {
2    version   = 1.001,
3    comment   = "companion to scrp-ini.mkiv",
4    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5    copyright = "PRAGMA ADE / ConTeXt Development Team",
6    license   = "see context related readme files"
7}
8
9-- This module needs dictionary files that looks as follows. At some point
10-- we will add these files to the distribution.
11--
12-- word-th.lua:
13--
14-- return {
15--     comment   = "The data is taken from http://thailinux.gits.net.th/websvn/wsvn/software.swath by Phaisarn Charoenpornsawat and Theppitak Karoonboonyanan.",
16--     copyright = "gnu general public license",
17--     language  = "th",
18--     compiling = "mtxrun --script patterns --words --update --compress word-th.lua",
19--     timestamp = "0000-00-00 00:00:00",
20--     version   = "1.00",
21--     lists     = {
22--         { filename = "tdict-city.txt" },
23--         { filename = "tdict-collection.txt" },
24--         { filename = "tdict-common.txt" },
25--         { filename = "tdict-country.txt" },
26--         { filename = "tdict-district.txt" },
27--         { filename = "tdict-geo.txt" },
28--         { filename = "tdict-history.txt" },
29--         { filename = "tdict-ict.txt" },
30--         { filename = "tdict-lang-ethnic.txt" },
31--         { filename = "tdict-proper.txt" },
32--         { filename = "tdict-science.txt" },
33--         { filename = "tdict-spell.txt" },
34--         { filename = "tdict-std-compound.txt" },
35--         { filename = "tdict-std.txt" },
36--     },
37-- }
38
39-- Currently there is nothing additional special here, first we need a
40-- ConTeXt user who uses it. It's a starting point.
41
42local splitters = scripts.splitters
43
44scripts.installmethod {
45    name        = "thai",
46    splitter    = splitters.insertafter,
47    initializer = splitters.load,
48    files       = {
49     -- "scrp-imp-word-thai.lua",
50        "word-th.lua",
51    },
52    datasets    = {
53        default = {
54            inter_word_stretch_factor = 0.25, -- of quad
55        },
56    },
57}
58