-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathChangeLog
More file actions
4563 lines (3090 loc) · 146 KB
/
ChangeLog
File metadata and controls
4563 lines (3090 loc) · 146 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2026-01-02 Theppitak Karoonboonyanan <theppitak@gmail.com>
* NEWS:
=== Version 0.1.30 ===
2026-01-02 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update COPYING from GNU Project.
* COPYING:
- Update to the latest version of the LGPL-2.1 text
from the GNU project, where FSF postal address has been
replaced with web site URL.
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
2026-01-02 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update library versioning.
* configure.ac:
- Bump LT_REVISION (1 -> 2) to reflect code change.
2026-01-02 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update Doxyfile for doxygen 1.15.0.
* doc/Doxyfile.in:
- Apply 'doxygen -u'.
* configure.ac:
- Bump doxygen required version.
2026-01-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Clarify license as LGPL-2.1+.
* README:
- Replace the "License" section with the contents suggested
at the end of LGPL, for clarity that it's under LGPL-2.1+.
Fixes #34.
2026-01-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary
* data/tdict-common.txt:
* data/tdict-science.txt:
- Add words.
2025-11-28 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move "thbrk-utils.h" to a separate location
As "thbrk-utils.h" is now used by other modules than "thbrk",
let's move it to a separate "utils" module and allow
C sources to include it as "utils/priv-utils.h".
* src/thbrk/thbrk-utils.h -> src/utils/priv-utils.h:
* configure.ac, src/Makefile.am, +src/utils/Makefile.am:
- Move thbrk/thbrk-utils.h to a seperate "utils" module.
- Rename the double-inclusion prevention macro accordingly.
* src/thbrk/Makefile.am
* src/thcell/Makefile.am
* src/thcoll/Makefile.am
* src/thctype/Makefile.am
* src/thinp/Makefile.am
* src/thrend/Makefile.am
* src/thstr/Makefile.am
* src/thwbrk/Makefile.am
* src/thwchar/Makefile.am
* src/thwctype/Makefile.am
* src/thwstr/Makefile.am
- Add "$(top_srcdir)/src" to the include path.
* src/thbrk/brk-common.c:
* src/thbrk/brk-maximal.c:
* src/thbrk/thbrk.c:
* src/thwstr/thwstr.c:
- Change inclusion clauses to the new one.
2025-11-28 Theppitak Karoonboonyanan <theppitak@gmail.com>
Fix possible dereference of NULL pointer in th_wthaichunk()
As caught by GCC analyzer,
* src/thwstr/thwstr.c (th_wnormalize):
- Handle malloc() failures before the NULL pointers are finally
dereferenced in th_wthaichunk().
2025-11-27 Theppitak Karoonboonyanan <theppitak@gmail.com>
Fix possible dereference of NULL pointer
As detected by GCC analyzer,
* src/thbrk/brk-common.c:
- (full_path): guard sprintf() against NULL 'full_path_buff'.
- (brk_load_default_dict): guard against NULL 'path'.
2025-11-27 Marc Mutz <@marcmutz@github.com>
Fix integer truncation in th_{tis2uni,uni2tis}_line
The size_t n parameter was narrowed to an int left variable,
which is wrong on 64-bit platforms, as callers expect
min(n, strlen(s) + 1) result characters to be written
(incl. the terminating NUL), yet, due to the truncation,
at most n mod 2^31 characters are written, which may be 0,
if n is size_t(INT_MAX) + .
Fix by making the left variable also be of type size_t.
This is safe, as each --left is protected by a left > 1 check,
so the value can never become negative.
We can't fix the return type, that would be incompatible with
existing users, but users don't need the return value: it's easily
calculated as min(n - 1, strlen(s)). Add a FIXME comment nonetheless,
for when compatibility can be broken, and use saturation arithmetic
instead of modular arithmetic to avoid the pseudo-random return value.
Amend the documentation accordingly.
* src/thwchar/thwchar.c:
- th_tis2uni_line, th_uni2tis_line:
- Redefine type of 'left' as size_t.
- Handle int overflow on the return value.
- Update documentation.
2025-11-27 Theppitak Karoonboonyanan <theppitak@gmail.com>
Fix utf-8 char pointer type warnings in test_thbrk
* tests/test_thbrk.c:
- Add u8char_t typedef.
- struct _Sample: redeclare str and ins_str as u8char_t pointers.
- utf8_to_tis, tis_to_utf8: make utf-8 args u8char_t pointers.
- test_samples:
- Redefine utf8_str as u8char_t array.
- Cast utf-8 strings to char pointers to satisfy strcmp().
2025-11-27 Theppitak Karoonboonyanan <theppitak@gmail.com>
Resore BestBrk::n_brk_pos
Although it's unused for now, let's still keep brk_pos
allocation size for future use when needed.
* src/thbrk/brk-maximal.c:
- BestBrk::n_brk_pos: restore as size_t type.
- best_brk_new: restore old BestBrk::n_brk_pos initialization.
2025-11-27 Marc Mutz <@marcmutz@github.com>
Fix narrowing size_t to int in BestBrk
* src/thbrk/brk-maximal.c:
- BestBrk::n_brk_pos: remove unused field.
- best_brk_new: port to size_t.
2025-11-26 Marc Mutz <@marcmutz@github.com>
brk_root_pool: port to size_t
All callers (brk_recover_try() and brk_maximal_do_impl()),
pass size_t variables, so don't narrow.
* src/thbrk/brk-maximal.c:
- BrkShot::n_brk_pos: type int -> size_t.
- brk_root_pool: type of pos_size arg, int -> size_t
2025-11-24 Theppitak Karoonboonyanan <theppitak@gmail.com>
Check Doxygen version without autoconf-archive.
* configure.ac:
- Check Doxygen version using AS_VERSION_COMPARE from within
autoconf instead of AX_COMPARE_VERSION from autoconf-archive.
* INSTALL:
- Drop autoconf-archive requirement from documentation.
2025-07-03 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionaries
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-science.txt:
- Remove คลอโรฟิลล์, duplicated with -std.
2025-07-03 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move common typo from -common to -spell
* data/tdict-common.txt:
* data/tdict-spell.txt:
- Move กาสะลอง (common typo of กาซะลอง)
from -common to -spell.
2025-07-03 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update tdict-std as found
* data/tdict-std.txt:
* data/tdict-common.txt:
* data/tdict-spell.txt:
- กาฬาวก -> กาฬาวกหัตถี
- add จิรัฐิติกาล
- remove ญานาซะฮ์, add more-common ญะนาซะห์ to -common
- ตัณฑุล -> ตัณฑุละ
- บังอวจ -> บังอวด, add บังอวจ to -spell
- ม่อลอกม่อแลก -> ม่อล่อกม่อแล่ก
- มะลอกมะแลก -> มะล่อกมะแล่ก
- add มัฆวา
- ลิกขา -> ลิกษา, add ลิกขา to -common
- remove เหมี่ยว
* data/tdict-std-compound.txt:
- add เกมโชว์
2025-06-30 Marc Mutz <@marcmutz@github.com>
Make static tables const
* src/thbrk/brk-ctype.c (_char_class, _break_table):
* src/thcoll/cweight.c (char_weight_tbl_):
* src/thwchar/thwchar.c (tis620_0_uni_map_, uni_tis620_0_map_,
tis620_1_uni_map_, tis620_2_uni_map_):
- Declare static tables as const.
2025-06-30 Theppitak Karoonboonyanan <theppitak@gmail.com>
Adjust code sequence a little bit.
* src/thbrk/brk-maximal.c (brk_pool_node_new_from_free_list):
- I'd rather keep the old logic that the brk_shot_reuse()
is called upon 'node', which was picked beforehand.
2025-06-30 Marc Mutz <@marcmutz@github.com>
brk_pool_node_new: realloc() in brk_shot_reuse() can fail
* src/thbrk/brk-maximal.c:
Handle failure of realloc() in brk_shot_reuse(), which requires adding
a return value to brk_shot_reuse() and handling it in
brk_pool_new_node().
If brk_shot_reuse() fails, try allocating a new node. Yes, if
realloc() failed, a following malloc() will likely fail, too, but this
way the error at least propagates up the call chain.
To keep the logic clean, factor the old if (env->free_list) code into
a separate function brk_pool_node_new_from_free_list().
Fixes #23.
2024-11-05 Theppitak Karoonboonyanan <theppitak@gmail.com>
Remove standardized terms from tdict-science.
* data/tdict-science.txt, data/tdict-spell.txt:
- Remove "กาแล็กโทส" and "แล็กโทส", which are already in tdict-std.
- Move spelling variations to tdict-spell.
2024-11-05 Theppitak Karoonboonyanan <theppitak@gmail.com>
Add entries to std, std-compound.
* data/tdict-std.txt, data/tdict-std-compound.txt:
- Add some new entries from the web.
2024-10-30 Arthit Suriyawongkul <arthit@gmail.com>
Add data README explaining word lists.
* +data/README:
Added to describe the purpose of each word list.
2024-08-22 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update std. spelling ทุกฏ -> ทุกกฏ in dictionary.
According to RI dict 2542 -> 2554 update.
* tdict-std.txt:
- Add new spelling 'ทุกกฏ'.
* tdict-std.txt, tdict-spell.txt:
- Move old spelling 'ทุกฏ' to tdict-spell.
2024-08-22 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-common.txt:
- Correct collation order of 'บิสซิเนส'.
2023-12-06 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt:
* data/tdict-currency.txt:
* data/tdict-district.txt:
* data/tdict-history.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
* data/tdict-std.txt:
- Add words.
2023-12-06 Montree Phromthong <montree.p@digitsoul.com>
Add country "คอซอวอ".
* data/tdict-country.txt:
- Add "คอซอวอ".
2023-12-06 Arthit Suriyawongkul <arthit@gmail.com>
Update README.
* README: Add note on first release date.
2022-11-18 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-std-compound.txt:
- Remove rare compound "สู่สม", which caused weird word segmentation
"สู่สม|ดุล".
2022-11-18 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-ict.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
- Add words.
2022-06-25 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-std.txt:
- Add some entries from on-line Royal Academy dictionary,
as found while working on thai-synonym.
2021-12-30 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-std.txt:
- Update some entries from on-line Royal Academy dictionary,
as found while working on TeX hyphenation patterns.
2021-12-21 Theppitak Karoonboonyanan <theppitak@gmail.com>
* NEWS:
=== Version 0.1.29 ===
2021-12-21 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-collection.txt:
* data/tdict-common.txt:
* data/tdict-ict.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
- Add words.
2021-09-18 Theppitak Karoonboonyanan <theppitak@gmail.com>
Handle possible malloc failures.
* src/thbrk/brk-maximal.c (brk_maximal_do_impl, brk_recover_try):
- Handle cases where brk_pool_node_new() possibly returns NULL.
In both places, fail gracefully by behaving as if the dict state
were single there.
Partially addresses Issue #15.
2021-09-18 Theppitak Karoonboonyanan <theppitak@gmail.com>
Fix typo in TIS-620 character name.
* include/thai/tis.h:
- Fix typo TIS_[S]YMBOL_BAHT, with backward compatibility macro.
2021-08-31 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update Doxyfile for doxygen 1.9.1.
* doc/Doxyfile.in:
- Apply 'doxygen -u'.
- Fix invalid PAPER_TYPE 'a4wide' to 'a4'.
* configure.ac:
- Bump doxygen required version.
2021-08-31 Theppitak Karoonboonyanan <theppitak@gmail.com>
Apply 'autoupdate' for autoconf 2.71
* configure.ac:
- Quote m4 strings in AC_INIT() parameters.
- Replace obsolete AC_PROG_LIBTOOL with LT_INIT. With this,
drop AC_LIBTOOL_WIN32_DLL, as we haven't really declared
dllexport anywhere yet.
- Replace obsolete AC_LIBTOOL_LINKER_OPTION() with
_LT_LINKER_OPTION(). Also quote an m4 string.
- Replace obsolete AC_HELP_STRING() with AS_HELP_STRING().
- Replace parameterized AC_OUTPUT() with AC_CONFIG_FILES()
and parameter-less AC_OUTPUT.
- Update AC_PREREQ() from 2.59 to 2.71.
2021-08-19 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt, data/tdict-spell.txt:
- Move "องคชาติ" from common to spell.
2021-08-19 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
* data/tdict-spell.txt:
- Add words.
2021-03-22 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break between Thai/Alpha and Percent
LB24 of UAX#14 prohibits break between AL and PO,
and between PO and AL, without example. But cases like
"ten%" can be found in the internet, and similar usage
like "สิบ%" sounds sensible in Thai.
* tests/test_thbrk.c (TestSamples):
- Add test case
* src/thbrk/brk-ctype.c (_break_table):
- (THAI, NUM_NBB): _A -> _I
- (ALPHA, NUM_NBB): _A -> _I
2021-03-19 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break between Currency and Alpha
LB24 of UAX#14 prohibits break between PR and AL,
and between AL and PR, without example. But some cases
can be found from Wikipedia:
- Brazilian real (usually written as R$)
- Nicaraguan córdoba (usually written as C$)
- Other uses: Micro$oft, George Luca$, etc.
https://en.wikipedia.org/wiki/Dollar_sign
Similar usage is not clear for Thai.
* tests/test_thbrk.c (TestSamples):
- Add test case, with "C++" to catch side-effect of PR and PR
* src/thbrk/brk-ctype.c (_break_table):
- (ALPHA, NUM_CUR): _A -> _I
- (NUM_CUR, ALPHA): _A -> _I
- (NUM_CUR, NUM_CUR): _A -> _I
2021-03-15 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break on the other side of parentesis
LB30 of UAX#14 prohibits break in "(s)he" and "person(s)".
The rule for Thai is more complicated. So, we only cover
Latin for now.
* tests/test_thbrk.c (TestSamples):
- Add test case
* src/thbrk/brk-ctype.c (_break_table):
- (ALPHA, NBA): _A -> _I
- (CLOSE, ALPHA): _A -> _I
2021-03-09 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break between Thai/Alpha and number
LB23 of UAX#14 prohibits break between AL and NU, and between
NU and AL. This makes sense for Latin. For Thai, prohibiting
break between AL and NU makes sense for codes like "กข43"
as a rice strain, but "40บาท" should still be broken.
* tests/test_thbrk.c (TestSamples):
- Add test case
* src/thbrk/brk-ctype.c (_break_table):
- (ALPHA, NUM): _A -> _I
- (NUM, ALPHA): _A -> _I
- (THAI, NUM): _A -> _I
2021-03-05 Theppitak Karoonboonyanan <theppitak@gmail.com>
Handle Latin acronyms
LB29 of UAX#14 prohibits break between IS and AL for acronyms
such as "e.g.", but this causes side-effects on other IS
punctuations like comma, colon, semicolon as well. This leads
to an error in case of ",ก" in Unicode LineBreakTest.txt
as tested by Pango, which I think it makes perfect sense
to allow break. So, I'm not trying to fix it, but try to
extend acronym handling to cover Latin instead.
* tests/test_thbrk.c (TestSamples):
- Add test case
* src/thbrk/thbrk.c (th_brk_find_breaks):
- Rename 'thai_chunk' variable to 'chunk'.
- Move brk_op() lookup to after chunk handling.
- Adjust acronym handling to cover BRK_CLASS_ALPHA acronyms.
- Reset chunk pointers every time break class changes,
not just when entering Thai chunk.
2021-03-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit some breaks around number sign
UAX#14 prohibits break within "#ก", which makes sense for
hashtags, but its classification as AL would affect cases
like "hello|สวัสดี". So, re-classify it as QUOTE instead.
* tests/test_thbrk.c (TestSamples):
- Add test cases
* src/thbrk/brk-ctype.c (_char_class):
- Change class of '#' from BRK_CLASS_ALPHA to BRK_CLASS_QUOTE.
Partially addresses issue #6.
2021-02-22 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break between right parenthesis and currency
It's common to write "12๎๎฿" instead of "฿12". So, line break
between right parenthesis and currency, such as in "(12)฿",
should be prohibited similarly to the left-side form.
* tests/test_thbrk.c (TestSamples):
- Add test cases
* src/thbrk/brk-ctype.h (brk_class_t):
- Add BRK_CLASS_CLOSE to separate ')', ']', '}' from BRK_CLASS_NBB.
* src/thbrk/brk-ctype.c (_char_class):
- Change class of ')', ']', '}' from BRK_CLASS_NBB to
BRK_CLASS_CLOSE.
* src/thbrk/brk-ctype.c (_break_table):
- Insert row and column for CLOSE, with contents copied from NBB.
- Change (CLOSE, NUM_CUR): _A -> _P
2021-02-19 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohibit break between currency and left parenthesis
In UAX#14, although LB18 (break after spaces) makes prohibited breaks
between PR and {NU,OP} in LB25 equivalent to indirect breaks,
the description of PR Property insists that it must be prohibited
"even if a space character intervenes", with "$ (100.00)"
as an example with no break opportunity. [1] So, we take them as
prohibited breaks.
[1] https://www.unicode.org/reports/tr14/#PR
* tests/test_thbrk.c (TestSamples):
- Add test case as interpreted from UAX#14
* src/thbrk/brk-ctype.c (_break_table):
- (NUM_CUR, NBA): _A -> _P
2021-02-18 Theppitak Karoonboonyanan <theppitak@gmail.com>
Prohitbit 2 break cases before percent
In UAX#14, although LB18 (break after spaces) makes prohibited breaks
between {NU,CL,CP} and PO in LB25 equivalent to indirect breaks,
the description of PO Property insists that it must be prohibited
"even if one or more space characters intervene", with "(12.00) %"
as an example with no break opportunity. [1] So, we take them as
prohibited breaks.
[1] https://www.unicode.org/reports/tr14/#PO
* tests/test_thbrk.c (TestSamples):
- Add test case as interpreted from UAX#14
* src/thbrk/brk-ctype.c (_break_table):
- (NUM, NUM_NBB): _I -> _P
- (NBB, NUM_NBB): _A -> _P
2021-02-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Rewrite thbrk test for extensibility.
* tests/test_thbrk.c:
- Rewrite to read and test from sample list.
- Encode samples in UTF-8 and convert them as required.
2021-02-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Simplify thbrk test.
* tests/test_thbrk.c:
- Remove interactive mode.
- Continue testing, rather than exit, on failures.
2021-02-05 Theppitak Karoonboonyanan <theppitak@gmail.com>
Provide our own version of INSTALL instruction.
* INSTALL:
- Explain simple installation steps and build requirements.
* .gitignore:
- Remove INSTALL ignoring.
This is to address a frequently found issue when
'autoconf-archive' is missing, like in issue #9.
2021-01-28 Theppitak Karoonboonyanan <theppitak@gmail.com>
Another protection against invalid array access.
In addition to commit 8e7ab6967f862a409352f7e8985fd4b445d37f4d.
* src/thbrk/thbrk.c (th_brk_find_breaks):
- Protect against accessing pos[-1] which may be caused by
a failure in brk_maximal_do().
Thanks Ratchanan Srirattanamet for the report via personal mail.
2020-08-16 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/Makefile.am, +data/tdict-currency.txt:
- Add new category.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-science.txt:
- Fix typo "อัลลอยด์" -> "อัลลอย".
2020-03-23 Ross Burton <ross.burton@intel.com>
configure.ac: remove duplicate AC_CONFIG_MACRO_DIR
Autoconf 2.70 will fatally error out if AC_CONFIG_MACRO_DIR is called
more than once:
| configure.ac:25: error: AC_CONFIG_MACRO_DIR can only be used once
* configure.ac:
- Remove duplicate AC_CONFIG_MACRO_DIR
2020-01-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-proper.txt, data/tdict-city.txt:
- Move "ลิเวอร์พูล" from proper to city.
* data/tdict-proper.txt, data/tdict-history.txt:
- Move "เมจิ" from proper to history.
* data/tdict-common.txt:
- Correct some sorting order.
2019-12-20 Theppitak Karoonboonyanan <theppitak@gmail.com>
Use GitHub issue tracker as bug report address.
* configure.ac:
- Replace bug report e-mail address with GitHub issue tracker URL.
2018-12-17 Theppitak Karoonboonyanan <theppitak@gmail.com>
Split compound in dictionary.
* data/tdict-std.txt:
- Split "ชิงช้าชาลี" into a new entry "ชาลี", as is the case in recent version
of Royal Institute dictionary.
2018-08-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
* NEWS:
=== Version 0.1.28 ===
2018-08-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update README.
* README:
- Use HTTPS in project URL.
2018-08-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update library versioning.
* configure.ac:
- Bump library revision to reflect code change.
2018-08-01 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
2018-06-21 Theppitak Karoonboonyanan <theppitak@gmail.com>
Fix warning on comma at the end of enum list
* src/thbrk/brk-ctype.h (brk_op_t):
- Remove comma at the end of enum list (-Wpedantic)
2018-06-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Adjust pointer declaration style
* src/thbrk/brk-common.c (brk_load_default_dict):
- Adjust pointer declaration style for 'dict_trie'
2018-06-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Avoid non-ANSI C snprintf()
* src/thbrk/brk-common.c (+full_path, brk_load_default_dict):
- Instead of preparing full path name with snprintf(), which is
non-ANSI, and still risks path name trimming, do it with
size-calculated malloc().
- free() it as needed.
2018-06-12 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-ict.txt:
* data/tdict-proper.txt:
* data/tdict-spell.txt:
- Add words suggested by @nuttee15 in issue #2
https://github.com/tlwg/libthai/issues/2#issuecomment-396442354
https://github.com/tlwg/libthai/issues/2#issuecomment-396456551
Thank you very much!
2018-06-12 Theppitak Karoonboonyanan <theppitak@gmail.com>
Add 2 words from new RI dictionary.
* data/tdict-std.txt:
- Add 'กายินทรีย์' and 'กาเยนทรีย์' from new RI dict.
2018-06-12 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
* data/tdict-spell.txt:
- Add words.
2018-05-31 Theppitak Karoonboonyanan <theppitak@gmail.com>
Add missing includes in header files.
* include/thai/thwbrk.h:
* include/thai/thwcoll.h:
* include/thai/thwinp.h:
* include/thai/thwrend.h:
- Add missing #include <thai/thwchar.h>
2018-01-08 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move some entries in tdict-common to proper files.
* data/Makefile.am, +data/tdict-slang.txt:
- Add file for keeping slangs.
* data/tdict-common.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-slang.txt:
* data/tdict-spell.txt:
- Move entries in tdict-common to more proper files.
2018-01-08 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-common.txt:
* data/tdict-country.txt:
* data/tdict-district.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-history.txt:
- Replace "ลาลูแบร์" with just "ลูแบร์".
2017-10-25 Theppitak Karoonboonyanan <theppitak@gmail.com>
* NEWS:
=== Version 0.1.27 ===
2017-10-25 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-geo.txt:
* data/tdict-history.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
* data/tdict-proper.txt:
- Correct order for some entries.
2017-08-07 Theppitak Karoonboonyanan <theppitak@gmail.com>
Strip prefix for C source files in doc
* doc/Doxyfile.in:
- Append "@top_srcdir@/src" and "@top_srcdir@/tests"
to STRIP_FROM_PATH, so that references to source directories
in the generated document do not capture full build path.
Defect caught by Debian Reproducible
2017-06-29 Theppitak Karoonboonyanan <theppitak@gmail.com>
Remove duplicated dict entry.
* data/tdict-common.txt:
- Remove 'ดัมพ์' which is already in tdict-std.
* data/tdict-common.txt:
* data/tdict-spell.txt:
- Move 'ดั๊มพ์' from tdict-common to tdict-spell.
2017-06-29 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-district.txt:
* data/tdict-geo.txt:
* data/tdict-ict.txt:
* data/tdict-lang-ethnic.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
2016-12-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
* NEWS:
=== Version 0.1.26 ===
2016-12-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Include git-version-gen in tarball
* Makefile.am:
- Add build-aux/git-version-gen to EXTRA_DIST.
2016-12-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move word.
* data/tdict-common.txt, data/tdict-ict.txt:
- Move 'แอดมิน' from tdict-common to tdict-ict.
2016-12-14 Theppitak Karoonboonyanan <theppitak@gmail.com>
Update word break dictionary.
* data/tdict-city.txt:
* data/tdict-common.txt:
* data/tdict-geo.txt:
* data/tdict-ict.txt:
* data/tdict-proper.txt:
* data/tdict-science.txt:
* data/tdict-spell.txt:
- Add words.
2016-07-09 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move some uncommon compound names out of tdict-std dictionary.
* data/tdict-std.txt, data/tdict-std-compound.txt:
- Move 'กระดองหาย', 'กระดาดขาว', 'นางรำ', 'นางหงส์'
to tdict-std-compound.
2016-07-08 Theppitak Karoonboonyanan <theppitak@gmail.com>
Move compounds out of tdict-std dictionary.
* data/tdict-std.txt:
- Remove long compound 'ตะลึงพรึงเพริด'.
- Keep only 'สะพรึง' instead of 'สะพรึงกลัว'.
* data/tdict-std.txt, data/tdict-std-compound.txt:
- Move compounds 'ตะลุ่มนก', 'ตากวาง', 'ตานนกกด' to tdict-std-compound.
2016-07-08 Theppitak Karoonboonyanan <theppitak@gmail.com>
Match git tag with version pattern.
* build-aux/git-version-gen:
- Apply --match pattern to git-describe to prevent confusion
with other tags.
- Drop unused LF var.
2016-07-07 Theppitak Karoonboonyanan <theppitak@gmail.com>
Use versioning based on Git snapshot.
* Makefile.am:
- Add dist-hook to generate VERSION file on tarball generation.
* +build-aux/git-version-gen:
- Add script to generate version based on 'git describe'
if in git tree, or using VERSION file if in release tarball.
* configure.ac:
- Call git-version-gen to get package version.
2016-06-28 Theppitak Karoonboonyanan <theppitak@gmail.com>
* configure.ac, NEWS:
=== Version 0.1.25 ===