NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Segmentation-free compositional n-gram embedding

Geewook Kim, Kazuki Fukui, Hidetoshi Shimodaira

Abstract: Traditional natural language processing models for unsegmented languages like Chinese and Japanese rely heavily on word segmenters, which are prone to errors in noisy environments like social media. This paper introduces Segmentation-free Compositional $n$-gram Embedding (SCNE), a method that bypasses word segmentation by treating raw character streams as collections of overlapping $n$-grams. By representing strings as compositions of frequent sub-$n$-grams, SCNE achieves state-of-the-art performance and demonstrates remarkable resilience to typos and slang in informal text.

Introduction

Most NLP models operate on the assumption that text consists of discrete "words." While spaces facilitate this in English, languages such as Chinese, Japanese, and Korean (CJK) lack explicit word boundaries. The standard approach involves using a word segmenter as a preprocessing step. However, this introduces a "segmentation bottleneck": errors in segmentation—common with neologisms, slang, or typos—propagate downstream, and out-of-vocabulary (OOV) words remain difficult to represent. SCNE addresses these issues by learning meaningful representations directly from character chunks, ignoring word boundaries entirely.

Methodology

SCNE combines character $n$-gram embeddings with a compositional subword model. The process begins by identifying the $M$ most frequent character $n$-grams (up to a maximum length $n_{max}$) in a raw corpus. Unlike models that enrich known words with subwords, SCNE defines the representation of any target $n$-gram as the sum of the embeddings of its constituent frequent sub-$n$-grams.

Figure 2: The compositional architecture of SCNE, where a target n-gram is represented by the sum of its sub-n-grams.

The model is trained using a Skip-gram objective with negative sampling. Instead of predicting neighboring words, it predicts physically adjacent $n$-grams in the raw character stream. This approach allows the model to "guess" the meaning of rare or unseen strings based on their parts, providing a seamless framework for representing characters, words, and phrases.

Evaluation and Insights

The authors evaluated SCNE across Chinese, Japanese, and Korean using Wikipedia dumps and "noisy" social networking service (SNS) corpora (Sina Weibo and Twitter). Tasks included word/sentence similarity, noun category prediction, and sentiment analysis.

A key insight is that the distributional hypothesis—that items in similar contexts share similar meanings—remains robust even when applied to arbitrary character chunks. Furthermore, compositionality serves as a defense against noise; if a user misspells a word, many constituent $n$-grams remain intact, allowing the model to maintain a stable representation.

Key Results

SCNE demonstrated superior performance, particularly in noisy environments. While traditional models like Skip-gram and FastText (SISG) experienced significant performance degradation on SNS data, SCNE remained remarkably stable.

Figure 6: Performance comparison showing SCNE's resilience to noise compared to traditional models.

As shown in the results, traditional models saw a 10-12 point drop in Spearman correlation when moving from Wikipedia to SNS data. In contrast, SCNE's performance only dropped by 2.2 points. Additionally, SCNE excelled in noun category prediction and sentiment analysis, outperforming established sentence embedding methods like sent2vec by capturing longer phrases through higher $n_{max}$ values.

Conclusion

SCNE offers a powerful, segmentation-free alternative for embedding unsegmented languages. While it is more computationally intensive than word-based models and currently less effective for space-delimited languages like English, its resilience to noise and effective OOV handling make it ideal for CJK social media text. Future work may explore hybrid approaches that incorporate easily obtainable boundary information to improve efficiency.

Summary updated

BibTeX
@inproceedings{kim2019segmentation,
  author = {Geewook Kim and Kazuki Fukui and Hidetoshi Shimodaira},
  title = {{Segmentation-free compositional n-gram embedding}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1324},
}
Figure