Syllable-based Neural Thai Word Segmentation
Paper · 2020 · Pattarawat Chormai, Ponrawee Prasertsom, Jin Cheevaprawatdomrong et al.
Summary
Written Thai generally leaves the reader to find where one word ends and the next begins. A computer needs to make those decisions explicitly for many kinds of natural language processing. A dictionary can suggest words that fit a stretch of text, but several familiar words can fit the same letters in different ways, and new words may be missing altogether. The authors use a property of Thai spelling to make the problem easier. A written word can contain several orthographic syllables, and a word boundary falls at a syllable boundary. Finding likely syllables first can tell a word segmenter both what larger units the characters form and where a word could begin.
The authors train a separate syllable segmenter and use its predictions in two ways. One set of word segmenters still decides at every character whether a word begins there. Each character receives information about its own identity and type, as well as an embedding, or learned vector, for the syllable that contains it. Another set makes decisions only at the starts of predicted syllables. The first approach keeps every character position available and supplies more evidence for each decision. The second makes the input sequence shorter and restricts the possible boundaries. The authors test both recurrent networks, which read the sequence in both directions, and dilated convolutional networks, which gather evidence from nearby positions at several spacings.
On the BEST2010 test set, the strongest syllable-tagging convolutional system reaches 95.60% word-level F1, compared with 94.46% for DeepCut. Word-level F1 rewards recovering complete words with both edges in the right places. On the Wisesight1000 social media sample, the highest score is 86.43%, from a convolutional system that uses syllables as features while tagging characters. On the Thai National Historical Corpus, a recurrent system that tags syllables reaches 79.89%, the highest reported score there. Adding syllable features also improves recall for Thai words absent from the BEST2010 training set in both network families. The historical corpus supplies an exception to the general pattern for added features, and the choice of where to make predictions matters across the test sets.
The authors also examine the evidence used to make boundary decisions. In their attribution analysis, the recurrent and convolutional systems draw most heavily on nearby characters, although the recurrent system can draw on distant ones. In a timing comparison on the BEST2010 test set, the syllable-tagging convolutional system that leads on word-level F1 runs 8.9× as fast as DeepCut on the tested CPU instance and 3.5× as fast on the tested GPU instance at batch size 1. Together, the results show how a spelling-level intermediate unit can improve boundary decisions and support a faster architecture. They also show why accuracy, recognition of unfamiliar words, and processing time need separate comparisons.
Deep dive: Syllable-based Neural Thai Word Segmentation
The paper tests how grouping Thai characters into written syllables improves word segmentation accuracy and changes the cost of finding word boundaries. · about 35 minutes to read
The problem and its context
Why finding a word boundary takes interpretation
For a reader who knows Thai, recognizing words is part of reading a continuous piece of text. For a computational system, it can be a separate preprocessing task. A program given the characters has to infer a set of boundaries before another component can work with words as its input units. This is a form of tokenization. The paper motivates it with systems that expect representations built from words, including approaches that count words and recurrent networks that read a sequence of them. The segmentation determines which strings those systems receive as words.
A segmentation is a decision about the characters in context. The paper illustrates this with กอดอกไม้. One division is กอ|ดอก|ไม้, which the authors gloss as a flower bush. Another is กอด|อก|ไม้, with a reading that involves hugging a wooden chest. The bars mark proposed breaks. Both analyses illustrate how a stretch of letters can offer plausible shorter pieces. The reading involving the flower bush is the one the authors regard as likely. A procedure that can identify dictionary entries still needs a way to choose among the sequences those entries allow.
The reference segmentation also depends on what counts as a word. The paper follows a definition centered on the smallest lexical unit that carries meaning. การบ้าน, meaning homework, is a single word under the guidelines even though its spelling contains pieces that can function separately elsewhere. A reading assembled from the separate meanings of the nominalizing element and the word for house would miss the established meaning of the whole. The paper uses กอดอก, meaning to cross one's arms, to show a more debatable case. Its parts can be understood through the meanings of hugging and chest, and that makes the boundary decision less clear-cut. For the datasets following the stated standard, the degree to which the meaning of the whole follows from its parts matters more than a change in grammatical function.
These examples describe different pressures on a segmenter. The flower-bush example presents rival divisions of a continuous string. The homework example presents an established lexical unit whose spelling includes independently interpretable material. The crossed-arms example concerns where an annotation guideline draws the line when a meaning is partly predictable. In each case, evaluating a system requires a human reference that records which division is to count as correct. The score therefore measures agreement with decisions made under a segmentation standard, including decisions about compounds.
Unfamiliar words pose a separate practical problem. The authors point to new words and borrowings as items that a dictionary may lack. Even if a system has evidence for where a word belongs in a sentence, a procedure organized around known word forms can struggle to propose the missing entry. A system that predicts boundaries from recurring parts of words has another route available. The paper tests that possibility on Thai words held out by their absence from the word-segmentation training material.
Why the authors start with Thai spelling
The authors place Thai alongside Japanese, Chinese, and Khmer as writing systems for which explicit word breaks can be unavailable. Their comparison also explains why they treat Thai spelling as central to the design. The Thai inventory described in the paper includes 44 consonant symbols, 15 vowel symbols, and 4 tone symbols. A Thai character can represent a consonant or vowel, while the paper describes a Chinese character as representing a syllable. In Thai, a written syllable brings multiple characters together under rules about which sequences can form it.
The distinction between spelling and pronunciation matters for the task. An orthographic syllable is a unit in the written string. The syllable segmenter is trained to identify units of that kind. The paper illustrates the distinction with จินตนา, divided into จิน and ตนา in the orthographic analysis. The first piece corresponds to a single syllable in pronunciation, while the paper describes the second as having two. The word segmenter uses the written division because its decisions concern where to put breaks in text.
Under the paper's definition, a written syllable belongs to a single word. A word can span several syllables, so some syllable breaks are internal to words. This creates an asymmetry that the method can use. Finding a plausible syllable break identifies a possible word break. Identifying a position inside a syllable gives a reason to leave it out of the word-boundary search, provided the syllable analysis is correct.
This written structure also affects the usefulness of tags that distinguish short and long words. The paper discusses character tagging in work on Chinese and Japanese, including the use of bidirectional long short-term memory networks. It also describes a tagset that distinguishes starts, interiors, ends, and units that stand alone. A standalone-character tag has limited application under the paper's description of Thai words as spanning at least two characters. A single orthographic syllable can form a word, however. Once syllables become the units being tagged, the shortest word class has a direct interpretation.
What previous Thai segmenters supplied
The paper describes earlier Thai approaches built around dictionaries and others that learned from features of the text. An early dictionary approach made decisions greedily as it found words. Later work used maximal matching to handle cases involving unfamiliar strings. Dictionary matching supplies useful candidates based on known forms, and its dependence on those forms creates the difficulty the authors associate with changes of domain. The words encountered in new subject matter or a different style of writing can differ from the entries that guide the match.
Thai Character Clusters supplied a different intermediate unit. The paper describes them as groups of characters loosely related to orthographic syllables and originally designed for information retrieval. Earlier work used such clusters as input to a decision tree that judged whether they should form a word. The authors also cite a system that used hand-designed syllable features and dynamic programming to choose a word segmentation. Another earlier approach used a hidden Markov procedure to propose words and checked them against a dictionary. The use of sub-word structure therefore had precedents. The contribution studied here is to predict orthographic syllables from annotated data and use their learned representations, their boundaries, or both in neural word segmentation.
The authors identify DeepCut as a convolutional segmenter working directly with character sequences. They also discuss bidirectional recurrent systems for Thai, including work that considered multiple segmentation candidates. Practitioners already had access to several implementations, but according to the paper their reported performance came from different benchmarks or lacked systematic published comparisons. The authors use a common evaluation and build character-only controls within their own network families. That setup lets them ask whether syllables help when the general kind of network and the basic tagging task are held comparable, alongside the broader comparison with existing tools.
The method, step by step
The boundary decisions
Take an unsegmented Thai string and consider each character as a possible start of a word. The basic word segmenter assigns B when a new word begins at that character and I when the character continues the current word. The characters between consecutive starts form a predicted word. Learning by sequence tagging means using annotated strings to learn which label to assign at each position, with evidence from nearby positions as well as the character at the position itself.
Syllable segmentation uses a parallel task. The input is still a string of characters, but the question at each position is whether it starts a new orthographic syllable. The desired word and syllable boundary sets have the following relationship.
B_w ⊆ B_s
B_w is the set of character positions that start words in a string. B_s is the set of positions that start orthographic syllables in the same string. The symbol ⊆ means that every position in the first set also occurs in the second. The subscripts w and s distinguish word and syllable starts. This relation describes the intended segmentation. The proposed word segmentation can inherit an error when it uses an automatically predicted B_s in place of the intended one.
The authors use this relation with different degrees of commitment. A character tagger treats syllable membership as evidence and retains the ability to put a word start at any character. A syllable tagger considers only the starts that the syllable segmenter supplies. When the syllables are right, the restricted set contains the correct word starts and removes positions within syllables. When a true word start is absent from that set, the syllable tagger cannot recover it. A spurious syllable start is less binding because the word tagger can assign a continuation label there.
From Thai character strings to predicted words
The steps in order.
Learning the syllable breaks
The syllable stage uses linguistic annotation from a subcorpus of the Thai National Corpus. Human-marked syllable boundaries supply targets for decisions at character positions. The training data contain 1.8M syllables, the development data contain 0.5M syllables, and the test data contain 0.25M syllables. The paper describes the division into training, development, and test material as 70:20:10. Training provides examples for learning which sequences signal a start. Development helps compare settings, and testing measures agreement on held-out text.
The authors compare a maximum-entropy classifier, called MaxEnt, with a conditional random field, or CRF. Both use observations around a candidate syllable boundary. The CRF also accounts for the sequence of predicted labels, allowing the fit of a label to depend on neighboring labels as well as on what the characters look like. This is the reason the authors have for expecting it to suit written syllable segmentation. They use the scikit-learn implementation for MaxEnt and pycrfsuite for the CRF.
To turn a local character string into observations, the paper tries templates built around the position where a boundary could fall. The simplest template, called Chr, records individual characters at positions within a window on either side. A template called ChrSpan uses a contiguous group of characters on each side. The more extensive n-gram template collects all groups of the chosen length within the window on both sides. An n-gram here is a sequence of adjacent characters. Looking at the characters separately can identify relevant letters or marks at different offsets. Looking at them as a group can identify an arrangement of letters that recurs near a syllable edge.
N, W ∈ {1, 2, 3, 4}
N is the number of characters in an n-gram. W is the window size, measured in character positions on either side of the proposed boundary. The symbol ∈ means membership, and the braces enclose the tested values. The comma between N and W indicates that both settings range over those values. For the individual-character template, W determines which characters are visible, while the n-gram templates also use N.
The configuration used in the word experiments is a CRF with individual characters and trigrams. A trigram is an n-gram with N equal to 3. The chosen W is 4 for both kinds of observations. The authors select this setting because its syllable boundaries align better with the BEST2010 validation word boundaries than those of the other leading CRF setting. That criterion fits the role of the syllable stage. A small gain in recovering complete syllables on a syllable corpus can matter less for the next step than preserving the syllable starts that are also word starts on the word corpus.
Preparing the input and forming the vectors
The preprocessing used for word segmentation first divides an input around punctuation. The syllable segmenter processes the resulting pieces, and their syllable lists are brought back together for the input. The word segmenter can then use the sequence as a list of syllables or use it to look up the containing syllable at each character position. The mapping from a character to its containing syllable supplies the connection between the stages.
The word networks represent units with embeddings, learned vectors whose entries contribute to later boundary decisions. A character has a vector for its identity and another for its character type. The first can distinguish individual written symbols. The second pools characters under categories that can be useful even when the exact symbol changes. The paper takes the type inventory from DeepCut. Its 12 categories include separate groups of Thai letters and vowels, a group for tone marks, and categories for digits, spaces, and Latin letters. The size is 32 for character embeddings and 32 for type embeddings.
The syllable dictionary is drawn from syllables obtained from the BEST2010 training material. Regular-expression rules map matching strings into shared categories for punctuation, URLs, English-letter sequences, and numbers. This allows a category to represent some recurring kinds of input without making each matching string a separate syllable entry. Syllable embeddings have dimension 64. The paper treats the use of pretrained syllable embeddings as future work. The role being tested here is whether syllable identity represented in the word network gives it useful evidence as it learns the segmentation task.
In the character formulation with syllable features, the network concatenates the character identity vector, character type vector, and containing syllable vector at each position. Concatenation places the entries from the different vectors alongside one another as a single input. The syllable component is shared by the characters that belong to that syllable. The other components still vary from one character to the next. This gives the network access to a broader spelling unit while preserving differences among positions within it.
The character-only controls receive identity and type vectors without the syllable vector. They still see neighboring characters through the context network. In the syllable formulation, the input has an embedding for each predicted syllable. The word component reads those embeddings directly, and each tag refers to the beginning of the syllable represented at that position. A sequence of character-level tags and a sequence of syllable-level tags give different views of the same underlying task. Both are decoded into word spans in the original string.
Gathering context before assigning a tag
One family uses a bidirectional long short-term memory network, abbreviated BiLSTM. A recurrent network builds a representation as it steps through the input, carrying information from earlier steps. Bidirectional recurrence adds a pass in the opposite direction, so a position can use information from the text that precedes it and text that follows it. An ambiguous boundary can benefit from both kinds of evidence. The computation proceeds through the sequence even if a particular prediction mainly relies on the immediate neighborhood.
The other family uses iterated dilated convolutions, abbreviated IDCNN. A convolution reads features from a neighborhood around a position and uses shared weights at different positions in the sequence. Dilation changes the spacing between the positions read by the filter. Stacking layers with increasing spacing lets the upper layer combine information from a broader area while each individual filter still reads a small number of positions. The authors adapt the approach from earlier work on entity recognition.
The paper describes three layers of width three, with dilations 1, 2, and 4. A width-three filter combines information from a center position and spaced positions on either side. With the given stack, the character version can collect evidence from up to seven characters on each side. That is the extent of available context in this design. The attribution analysis later asks how much of it makes a substantial contribution to the predictions. For syllable input the layers operate over syllable positions, so a step in the convolution sequence corresponds to a whole written syllable.
Both families follow the context layers with two fully connected layers, which turn the extracted features into scores for the available tags. Some configurations add a CRF to the output of the word segmenter. This CRF deals with word tags and is distinct from the CRF that initially finds syllables. It adds a sequence-level component to the decision based on the scores that the context network supplies. By comparing syllable taggers with and without this last layer, the authors can ask whether another treatment of neighboring output labels contributes beyond the context already captured in the representations.
Encoding word length in the labels
The ordinary BI tagset distinguishes starts and continuations. That is enough to mark word boundaries. A label can carry more information if it also indicates the length class of the word to which the unit belongs. The authors try this in the syllable taggers because syllable count gives them a meaningful way to distinguish words that occupy a single input unit from words of several units.
Scheme A divides words into short, middle, and long classes. Short words have one or two syllables, middle words have three or four, and the long class is 5+. Each class has its own beginning and continuation labels. The classes group similar lengths so the segmenter can learn different patterns for words at different scales without assigning a separate label set to every possible length.
Scheme B distinguishes the shorter lengths more finely.
k ∈ {1, 2, 3, 4+}
k is the word's length category measured in syllables. The symbol ∈ indicates that it takes a value from the categories inside the braces. The plus sign in 4+ makes that category include lengths of 4 syllables and above. The other entries refer to exact syllable counts. In the paper's BIₖ notation, B still marks the beginning and I still marks a continuation, with k selecting the length category to attach to the label. For reading off the word boundaries, each beginning tag continues to mark a word start.
The richer tagsets give the network a more detailed training target. A correct boundary label with the wrong length class and a correct boundary label with the right length class become different predictions during training. The experiments ask whether the extra distinctions pay off when the output is assessed as complete words. The length category and the sequence-level CRF are independent design choices in the syllable experiments, which allows the paper to compare how each behaves with the two ways of encoding context.
Training and selecting configurations
The authors implement the word segmenters in PyTorch and use the Adam optimizer to adjust their learned weights. The training settings specify 20 epochs, with a learning-rate schedule that responds to a plateau. An epoch is a pass through the training data. For each run, the saved checkpoint is the one from the epoch with the lowest validation loss. The checkpoints are then compared by word-level F1 on the validation data. Validation loss and validation F1 thus serve at different points in selection. The first chooses a checkpoint from a run, and the second describes the segmentation quality attained by the configuration.
The hyper-parameter search uses 20 random trials for a setting. The trial settings include learning rate, weight decay, dropout, and layer sizes. The recurrent search varies the number of LSTM cells, and the convolutional search varies the number of filters. These choices affect how the networks learn and how large the resulting systems are. The training infrastructure uses an Nvidia GTX 1080. Character taggers use a batch size of 32, while syllable taggers use 128. A batch groups input sequences for a training update, so trials using different sequence units can differ both in the length of each sequence and in how many sequences they process together.
The paper reports the strongest validation result for each setting alongside the mean and standard deviation across its trials. This shows how a setting fares when a search selects its best run and how its runs performed more generally. The configurations compared on the test sets include both character-only controls and selected systems with syllable input or features. The authors make the implementation public and report that their syllable segmenter became part of PyThaiNLP.
Experiments and results
What the scores measure
A character-level score evaluates predictions about word or syllable starts. A correct prediction at a start contributes to precision and recall. A start proposed at the wrong position hurts precision, and a start missing from the proposed positions hurts recall. Precision asks how many proposed starts match the reference, while recall asks how many reference starts the segmenter finds. F1 combines the two. For the syllable experiments the starts belong to syllables, and for the word experiments they belong to words.
A chunk-level score applies the comparison to complete syllables or complete words. The reference and the prediction must agree on the boundaries of a chunk for it to count as correct. The paper illustrates the distinction with ฝน|ตก|ที่|ทะเล, a phrase about rain at sea, in which the separators indicate the reference segmentation. When a prediction misses a break between pieces, it can still identify the start of the joined stretch. That start earns character-level credit, while the joined prediction fails to recover the reference words. An extra break can create a similar difference by splitting a reference word that began at the correct position.
The paper reports both character-level and syllable-level F1 for the syllable experiment. Word-level F1 is the principal measure in the word experiment. It gives a direct interpretation to comparisons of downstream segmentation quality because a consumer of the segmentation receives whole spans. The paper also reports recall restricted to unfamiliar words. That measure asks how many eligible reference words were recovered and has a different scope from word-level F1 over the full test set.
How well the syllable stage works
The syllable experiment uses the part of the Thai National Corpus with annotated syllable boundaries. The paper describes this material as containing 2.56M syllables and around 8M characters. The comparison on the held-out syllable data shows high agreement for both the MaxEnt classifier and the CRF, including when the unit of evaluation is the entire syllable. The settings differ in which character templates they use and in how much surrounding text those templates cover.
Syllable-level F1 on the Thai National Corpus test split
CRFs with individual characters and trigrams lead the comparison.
The numbers
| System or setting | syllable-level F1 % |
|---|---|
| MaxEnt with characters | 97.84 |
| MaxEnt with characters and trigrams | 98.02 |
| CRF with characters and adjacent spans | 98.10 |
| CRF with characters and trigrams, wider window | 98.54 |
| CRF with characters and trigrams, narrower window (this paper) | 98.58 |
The highest syllable-level result comes from the CRF using individual characters and trigrams with a window of 3. Its character-level F1 is 99.46%. The window of 4 used downstream scores 99.44% at character level and 98.54% at syllable level on the same test split. Among the MaxEnt settings shown, the use of characters and trigrams with a window of 4 yields 99.29% character-level F1 and 98.02% syllable-level F1. The MaxEnt setting with individual characters in the same window scores 99.18% at character level and 97.84% at syllable level.
The high scores make automatic syllables a plausible preprocessing input, and the difference between the metrics shows why complete chunks remain worth measuring. The word experiments use the slightly lower-scoring CRF on the syllable test because of how its output aligns with word breaks on BEST2010 validation data. The score that identifies the best syllable segmenter in isolation and the criterion used to choose its output for word segmentation answer different questions.
The word datasets and comparison systems
BEST2010 is the source of word-segmentation training data. The main experiment describes 415 documents covering news, articles, encyclopedias, and novels. Dividing the material by line gives 134,107 samples, with around 5.11M words and 18.74M characters. The corpus carries word boundaries and named-entity markup. The authors take 10% of the training material for validation and balance the representation of the document categories. Their in-domain evaluation uses the official TEST_100K split, described in the experiment as 2,252 samples, about 128K words, and 496K characters.
The historical test material comes from the Thai National Historical Corpus, or TNHC. It consists of classical Thai literature with human-marked word boundaries. The experiment describes it as containing 20,791 samples, around 599K words, and 2.14M characters. In preprocessing, the authors remove a file with encoding issues and strip metadata tags from the remaining files. The evaluation asks how word segmenters trained on BEST2010 behave on this kind of text.
The social media test is Wisesight1000, drawn from Wisesight's collection of 26,700 messages. The collection lacked word boundaries for this evaluation, so the authors randomly select 1,000 samples from its test split, remove 7 spam messages, and manually segment the resulting material using the stated Thai word standard. They describe the annotated set as having around 22K words and 75K characters. The word-boundary annotation is available through the Wisesight repository. The comparatively short messages and the historical literature serve as distinct out-of-domain tests. Each score concerns its own reference and genre.
The dictionary baseline is PyThaiNLP with its maximal-matching engine. DeepCut is the external neural baseline, with a character-level convolutional architecture that the paper describes as having a stack of 13 convolutional filters and around 500K trainable parameters. The character-only BiLSTM and IDCNN add controls that the authors train within the two network families used in the study. Their BI labels and character-based features provide a comparison for the corresponding character taggers with syllable embeddings. In the paper's shorthand, CH covers character identity and type, SY indicates syllable embeddings, and CH+SY indicates that the character tagger has both sources of information.
Exact word recovery in and outside the training domain
Word-level F1 on the official BEST2010 test split
The syllable-tagging IDCNN has the highest exact-word score.
The numbers
| System or setting | word-level F1 % |
|---|---|
| PyThaiNLP maximal matching | 71.18 |
| DeepCut | 94.46 |
| BiLSTM with character features | 95.05 |
| BiLSTM with character and syllable features | 95.59 |
| BiLSTM with syllable tags and CRF | 95.51 |
| IDCNN with character features | 94.31 |
| IDCNN with character and syllable features | 95.45 |
| IDCNN with syllable tags, CRF, and Scheme A (this paper) | 95.60 |
On BEST2010, several configurations that incorporate syllables score above DeepCut's 94.46% word-level F1. The IDCNN that tags syllables with Scheme A and a word-level CRF reaches 95.60%, and the BiLSTM that supplies syllable vectors to a character tagger reaches 95.59%. Their inputs and output structures differ. The first evaluates only the word starts admitted by the syllable segmentation. The second assigns word tags at character positions with syllable membership available as evidence. Their reported test scores are close, and the comparison does not establish that one of these designs consistently gives better in-domain accuracy.
On the Wisesight1000 sample, the maximal-matching baseline scores 78.97% and DeepCut scores 84.45%, both in word-level F1. The strongest reported result is 86.43% from the IDCNN character tagger with both character and syllable features. The corresponding character-only IDCNN scores 85.80%. The BiLSTM character tagger with syllable features reaches 86.15%, and the Scheme A IDCNN syllable tagger also reaches 86.15%. The ordering on this social media test favors a convolutional system that uses syllables as features while allowing word starts at character positions.
On TNHC, the dictionary result is 72.70% and DeepCut gives 78.17% word-level F1. The highest score is 79.89%, from the BiLSTM that tags syllables with BI and a CRF. The character-based IDCNN with syllable features follows at 79.87%, and the syllable-tagging IDCNN with Scheme A reaches 79.64%. Adding syllable features to the character BiLSTM gives 78.70%, compared with 79.31% for the character-only version. That comparison is an exception to the gains seen for the same feature change on BEST2010 and Wisesight1000. The historical results support the use of syllables in particular configurations, with no single formulation taking the lead on all three datasets.
Inference speed on the same test material
The timing experiment measures wall-clock time to segment the BEST2010 test set. It uses a t2.medium CPU instance and a p2.xlarge GPU instance. Before benchmarking, the authors remove named-entity tags and separator marks from the reference and the corresponding input. Each configuration is timed in five runs, with the first two used for warm-up and the reported average taken from the last three. The speed factors compare processing of the same test data under the stated conditions.
BEST2010 test segmentation speed relative to DeepCut on CPU
The syllable-aware IDCNN settings process the test set faster than DeepCut.
The numbers
| System or setting | speed factor × |
|---|---|
| DeepCut | 1 |
| BiLSTM with character and syllable features | 3.3 |
| IDCNN with syllable tags, CRF, and Scheme A (this paper) | 8.9 |
| IDCNN with character and syllable features | 10.8 |
| IDCNN with character features | 21.3 |
| PyThaiNLP maximal matching | 86 |
The starred setting is the one with the highest BEST2010 word-level F1. Faster configurations occupy different points in the accuracy and speed comparison. Maximal matching reaches 86× the CPU speed of DeepCut while producing a much lower word-level F1 on the same corpus. The character-only IDCNN is also faster than the starred system while scoring lower on BEST2010. The joint result for the starred setting is a higher word-level score than DeepCut together with faster processing in this CPU test.
On the GPU at batch size 1, the Scheme A syllable IDCNN is 3.5× as fast as DeepCut, and the character BiLSTM with syllable features is 3.3× as fast. The paper also tests GPU segmentation at batch size 128. DeepCut's interface did not allow the authors to set that batch size, so those measurements use the character-only BiLSTM as the reference. Under that condition the reported speed factors for the featured recurrent and convolutional syllable taggers are both 0.5× relative to the new reference. The authors emphasize the CPU comparison because segmentation is an early processing step they want to run efficiently on ordinary computing infrastructure. The GPU comparisons demonstrate how batching and the choice of reference affect the speed claim.
What the ablations show
Making the same character decisions with better features
The closest comparison for the effect of syllable embeddings keeps the character tagging task and BI labels in place. The authors compare character identity and type against the same feature set plus a syllable vector. Within the BiLSTM family, the best BEST2010 validation word-level F1 is 97.01% with character features and 97.34% with the additional syllable features. Within the IDCNN family, the corresponding best scores are 96.53% and 97.11%. The gains are also visible in the official test split. Because the word tagger is still allowed to place a break at any character, this comparison supports the feature explanation independently of a hard restriction on boundary positions.
The trial averages tell a similar story. On BEST2010 validation, the BiLSTM character control averages 96.55 ± 0.44 in word-level F1, while its syllable-feature counterpart averages 97.06 ± 0.28. The IDCNN goes from 95.75 ± 0.83 to 96.88 ± 0.16. The paper reports these as the mean and standard deviation across the 20 search trials for each setting. In each family the syllable-feature runs have a higher average and a smaller spread. That matters because the advantage is visible across the search runs as well as among the best configurations they yield.
These comparisons use separately tuned configurations. The authors vary settings such as the width of layers and the training parameters during the search. The comparison therefore tells us how well the characteristic feature choices fare under the paper's tuning procedure. It has less to say about the effect of adding a vector to a fixed trained network or about how much of the gain requires syllable boundaries specifically. The vector changes the information supplied at each position and can also change the number of learned parameters.
The test results qualify the feature result by domain. The IDCNN benefits from the added vectors on all the word test sets shown. The BiLSTM benefits on BEST2010 and Wisesight1000, while the corresponding historical result declines. A syllable vector can expose a useful recurring piece of spelling, but its usefulness depends on how the network has learned to associate that spelling with boundaries and on the distribution of the strings it encounters. The experiment establishes that the feature is useful across several comparisons. The historical BiLSTM result shows how that judgment can change for a specific architecture and dataset.
Recovering Thai words absent from training
The out-of-vocabulary analysis narrows the question to Thai words in the BEST2010 test set that do not occur in the training set. An eligible unfamiliar word can still contain known characters and syllables. Recovering it requires a correct segmentation from those or other contextual cues. The paper reports recall taken by distinct word forms and by token occurrences. In the first view, recovering a variety of unfamiliar forms matters. In the second, repeated instances of a form contribute each time they occur.
For the character BiLSTM, adding syllable features raises recall by distinct unfamiliar word forms from 49.51% to 58.62%. The token-based recall moves from 59.58% to 67.42%. For the character IDCNN, the corresponding results by forms are 44.83% and 48.52%, while the token-based results are 51.92% and 64.09%. Both ways of looking at the data support an advantage for the extra features. The token-based gain in the IDCNN comparison is more pronounced than the result by distinct forms. This shows why a result over occurrences and a result over different words can give different impressions of the same configuration.
The syllable-tagging IDCNN with Scheme A has 56.53% recall by forms and 65.35% by tokens in this analysis. The BiLSTM with syllable tags, BI, and a CRF reaches 58.37% by forms and 65.09% by tokens. The character BiLSTM with syllable features has the highest reported recall by either counting approach. DeepCut scores 52.09% by forms and 60.47% by tokens, so some character controls fall below an existing segmenter on this restricted measure. The improvement from the syllable representations is clearest when it is read alongside the character controls and the absolute baseline results.
This analysis supports the claim that syllable information helps with more than recognizing complete words seen in the word training set. A training-unseen word can be composed of familiar written parts, and the boundary decision can use evidence at that smaller scale. The analysis measures the recovery of whole test words. It does not identify which particular syllables were already familiar or isolate the role of the containing syllable from the surrounding characters in each recovery. The accompanying character-only controls bound the claim to what changes when the syllable feature is available under this training setup.
Restricting the decisions and enriching the tags
Tagging syllables changes the unit of prediction. Even the simplest syllable tagger, using BI and no word-level CRF, shows how much can be done in this formulation. On BEST2010 validation the best syllable BiLSTM with BI reaches 97.09% word-level F1, and the best syllable IDCNN with BI reaches 97.06%. The corresponding character taggers with syllable features have best scores of 97.34% and 97.11%. These results show that much of the validation performance is attainable after restricting the input and candidate positions to predicted syllables.
The comparison also changes several things together. The syllable tagger discards the separate character identity and type inputs, reads shorter sequences of larger units, and can only place boundaries at their starts. Its filters or recurrent steps move in units of syllables. The strong scores show that this complete formulation can work, including on test material from other domains. The results alone do not assign a share of the performance to fewer candidate positions, fewer input steps, or the representation attached to each step.
Length categories have mixed effects. Among the syllable BiLSTMs without a word-level CRF, the best validation word-level F1 is 97.09% with BI, 97.08% with Scheme A, and 96.94% with Scheme B. For the comparable IDCNNs, the scores are 97.06% with BI, 97.02% with Scheme A, and 96.86% with Scheme B. Under these conditions, the best binary-tag run in each family is ahead of the best runs with specialized length classes. The trial averages give a slightly different ordering for the plain IDCNN. Scheme A averages 96.51 ± 0.33 on validation, while BI averages 96.47 ± 0.41.
The final CRF can help in some cases. With a syllable IDCNN and Scheme A, the best validation score is 97.26% with the CRF and 97.02% without it. With the syllable BiLSTM and Scheme A, the best score is 96.90% with a CRF and 97.08% without it. For the IDCNN with the CRF, Scheme B has the highest trial average at 96.76 ± 0.33, while Scheme A gives the highest single validation score and supplies the configuration used for the featured test comparison. The distinction between the mean and the best result matters when deciding what the search has established.
The authors suggest that the recurrent and convolutional context layers can already learn patterns that the sequence-level CRF or richer labels would otherwise supply. The scores support a cautious version of that interpretation. The gain from the added layer varies with architecture and label scheme, and richer length labels frequently give similar or lower validation results. The full Scheme A syllable IDCNN remains a strong configuration. Its success establishes that the components can work together under the tested procedure, while the controlled comparisons show that the length categories have a less consistent effect than the added syllable features.
How much search the gains require
A separate analysis uses the results of the random searches to estimate the validation performance a practitioner could expect at a given training budget. The paper applies an earlier reporting method that asks how the strongest result expected from a search changes with the number of trials. The budget is expressed as training duration on the Nvidia GTX 1080.
T = t̄ × n
T is the training-duration budget shown for a setting. t̄ is its average training time per trial, with the bar marking the average. n is the number of trials. The multiplication sign × and the equality sign = express the paper's way of turning a trial count into a duration for the plot. The plotted performance is expected word-level F1 on BEST2010 validation under that search budget.
Configurations with syllable features have better expected validation performance than the character-only controls in this analysis. A trial with syllable features can itself take longer. The mean trial duration for the character BiLSTM is 92 minutes without syllable embeddings and 112 minutes with them. For the IDCNN character taggers the corresponding durations are 98 minutes and 105 minutes. What improves is the expected validation result at a given search budget. The result combines the cost of a trial with the distribution of scores obtainable across trials.
The paper identifies a budget below seven hours at which the character IDCNN with syllable features is expected to do better than the recurrent syllable tagger with BI and a CRF or the Scheme A convolutional syllable tagger with a CRF. The character BiLSTM with syllable features has the most favorable expected validation curve in the authors' comparison, while the CPU inference benchmark favors the convolutional family for speed. This separates the resource cost of finding a good configuration from the cost of running it on new text. Training budget, selected accuracy, and deployment timing each reflect a different stage of the experiment.
Which characters contribute to a prediction
The paper uses Integrated Gradients for an interpretability analysis of the character BiLSTM and IDCNN with syllable features. The technique attributes part of a prediction to each input position by tracking how the prediction changes along an interpolation from a baseline input to the observed input. Here the baseline is a sequence of padding characters. The authors use Captum with an interpolation setting of 100 and visualize absolute, normalized attributions. An absolute score indicates the size of the contribution under this procedure, without retaining its direction.
The displayed example segments เวลา|ใน|ความหมาย|ของ|วิทยาศาสตร์, which the paper glosses as time in a scientific definition. The attribution diagrams relate positions in the input to the tag predictions. A band near the diagonal means that the positions receiving large attributions tend to be near the positions being tagged. Both diagrams show that pattern. The recurrent system, which can use information from far away in the sequence, also concentrates its attributed evidence near the prediction.
The authors then aggregate attribution over 338 BEST2010 test samples with lengths between 21 and 50 characters. They examine positions up to 10 characters to the left and right of the one being tagged. For both architectures, the attribution is concentrated around three characters to either side. The distributions place slightly more weight on the left, which the authors relate to the writing direction of Thai. The study reports that asymmetry in the selected samples and systems. It does not test a change of writing direction or isolate the linguistic source of the asymmetry.
The concentration offers a reason why the tested convolutional architecture can perform well with a finite window. Much of the attributed evidence falls in a range that the filters can reach. The aggregation does not separately remove distant information from the recurrent system and measure the resulting errors. It shows where this attribution procedure locates most of the evidence under the settings studied. Combined with the competitive test scores and the timing comparison, it supports the case that nearby context is frequently sufficient for these tagging decisions.
Limitations
Limits and open questions identified by the authors
The authors identify joint learning of syllable and word segmentation as future work. The evaluated pipeline learns the syllable segmenter separately, chooses a configuration, and uses its predictions to prepare word input. The downstream objective therefore does not directly train the preceding syllable decisions. When word boundaries would benefit from a different syllable analysis, the word system has only the options given by its formulation. A character tagger can still place a start at a position inside a predicted syllable. A syllable tagger depends on the available syllable starts.
The paper also leaves the effect of pretrained syllable embeddings for future investigation. In the evaluated comparison, a syllable has a useful role as an input representation and as a unit onto which to place word tags. The authors do not measure whether embeddings learned from an additional corpus would increase this benefit, for instance by broadening the range of represented syllables. The results concern the representations and training data used in the experiments.
A third open question is the effect of the segmentation on later language-processing tasks. The motivation is that many tasks receive segmented text, and the experiments measure how well the systems reproduce human word divisions. Recovering more reference words can change the input to those tasks, but its effect on their outputs depends on which boundaries matter for the task and which errors remain. The paper reports no outcome for a downstream system fed by the competing segmenters.
The authors also acknowledge ambiguity and typos in the material that a syllable segmenter encounters. They adopt orthographic syllables as a computational unit even when the division differs from pronunciation. Their own example of ตนา, described as a single written unit with two syllables in pronunciation, underscores the distinction. As a result, the syllable evaluation answers a question about the boundaries used in the annotated written segmentation. It does not establish equivalent accuracy for phonological syllabification.
Limits visible in the comparisons
The high syllable scores come from the held-out portion of the Thai National Corpus subcorpus. The word segmenters also use predicted syllables on BEST2010, historical literature, and social media. The word results show how the whole pipeline fares on those datasets, but the paper does not give a matched syllable-level evaluation for each word test set. It also supplies no word segmentation comparison using gold syllables in place of predicted ones. Consequently the results do not quantify how much of the remaining word error is caused by incorrect syllable breaks or how much word accuracy would increase if every available syllable division were correct.
The word boundaries represent an annotation standard. The compounds discussed by the authors illustrate why reasonable decisions can depend on that standard, especially when the whole meaning is partly predictable. A word-level score on one corpus shows how closely the system matches that corpus's reference. A social media sample annotated for the experiment and a corpus of historical texts can also have different vocabulary, spelling, and boundary practices. The comparison across datasets shows how the systems rank on those particular tests. It does not isolate the independent effect of each difference between the datasets.
Some numerical descriptions in the paper also use different totals. The main experiment describes the BEST2010 test split as having about 128K words, while the appendix lists 0.19M words for the test data. For TNHC, the experiment describes around 599K words and the appendix lists 0.67M. The reported word F1 values can be read against their named test sets, but the paper leaves the count discrepancies unresolved. They matter when using the corpus totals to interpret the evaluation's scale or trying to reconstruct it solely from the reported statistics.
Separate tuning is useful for comparing practical versions of the settings. It also means differences in the scores can reflect the architecture, features, training choices, and selected checkpoints together. The paper provides the distributions from repeated validation searches. It does not give uncertainty estimates for the individual word test scores. The nearby BEST2010 results of 95.60% and 95.59%, for instance, establish the reported ordering on that test run. They offer little support for preferring one formulation on accuracy across repeated fits or future samples.
The attribution findings are conditional on the chosen inputs and baseline. Absolute attribution shows magnitude, while suppressing whether the evidence pushed a score up or down. Aggregating over selected test sequences describes a typical concentration in those sequences and can obscure individual decisions that draw on more distant positions. The experiment provides a plausible explanation for why a local convolution can compete with recurrence. A direct test of the necessity of longer context would require varying access to it and comparing the resulting predictions.
The speed factors apply to specific hardware, input and batch settings, reference implementations, and wall-clock measurements. In particular, the GPU figure at batch size 1 is relative to DeepCut, while the large-batch comparison uses the character BiLSTM. Comparisons within either setting tell us about the systems' measured behavior under that condition. A speed factor carried from one setting to the other would change both the processing setup and the denominator of the comparison.
What came after
Thai word segmentation across domains
Handling Cross- and Out-of-Domain Samples in Thai Word Segmentation cites the syllable-based paper and takes cross- and out-of-domain Thai segmentation as its subject. This is the problem exposed by the different rankings on BEST2010, Wisesight1000, and TNHC. A system fitted to word annotations in one collection must recognize words and boundary patterns in text drawn from elsewhere. Chormai and colleagues test syllables as recurring units that can help with that transfer, including when complete test words are unfamiliar.
The later citation places the syllable study in the context of research explicitly focused on handling domain change. The citing work's title identifies that focus. The specific role of the earlier system in its experiments, including whether it adopts the syllable tagger, uses its embeddings, or compares against its results, is unspecified.
Syllable structure beyond the Thai task
Syllable Structures Across Arabic Varieties also cites the Thai segmentation paper. Its stated subject is syllable structure across Arabic varieties. The connection is at the level of syllables as units worth distinguishing and examining. In the Thai study, the unit has a specific job in a pipeline that recovers word boundaries from writing. The Arabic work's title indicates a comparison of syllable structures across varieties, where describing the units is itself the subject.
The citation establishes a connection between those lines of work. It leaves open which aspect of the Thai study is cited and whether the Arabic analysis uses any of its computational procedure. The later works point to different contexts for the paper's contribution. One concerns how Thai word segmentation behaves under a change of domain. The other concerns syllable structure in a different language setting, where the Thai paper's distinction between a written segmentation unit and a unit of pronunciation remains relevant to interpreting what a study is measuring.
Cite
Cite as Pattarawat Chormai, Ponrawee Prasertsom, Jin Cheevaprawatdomrong and Attapol Rutherford. 2020. Syllable-based Neural Thai Word Segmentation. Proceedings of the 28th International Conference on Computational Linguistics.
@inproceedings{chormai2020syllable,
title = {{Syllable-based Neural Thai Word Segmentation}},
author = {Pattarawat Chormai, Ponrawee Prasertsom, Jin Cheevaprawatdomrong and Attapol Rutherford},
booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
year = {2020},
doi = {10.18653/v1/2020.coling-main.407},
url = {https://doi.org/10.18653/v1/2020.coling-main.407}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/chormai-2020-syllable-based-neural-thai-word/