arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1809.00918v2 [cs.CL] 29 May 2019

Segmentation-free Compositional nn-gram Embedding

Geewook Kim    Kazuki Fukui    Hidetoshi Shimodaira Affiliation: Department of Systems Science, Graduate School of Informatics, Kyoto University Affiliation: Mathematical Statistics Team, RIKEN Center for Advanced Intelligence Project Affiliation: {geewook, k.fukui}@sys.i.kyoto-u.ac.jp, shimo@i.kyoto-u.ac.jp
Abstract

We propose a new type of representation learning method that models words, phrases and sentences seamlessly. Our method does not depend on word segmentation and any human-annotated resources (e.g., word dictionaries), yet it is very effective for noisy corpora written in unsegmented languages such as Chinese and Japanese. The main idea of our method is to ignore word boundaries completely (i.e., segmentation-free), and construct representations for all character nn-grams in a raw corpus with embeddings of compositional sub-nn-grams. Although the idea is simple, our experiments on various benchmarks and real-world datasets show the efficacy of our proposal.

1 Introduction

Most existing word embedding models Mikolov et al. 2013; Pennington et al. 2014; Bojanowski et al. 2017 take a sequence of words as their input. Therefore, the conventional models are dependent on word segmentation Yang et al. 2017; Shao et al. 2018, which is a process of converting a raw corpus (i.e., a sequence of characters) into a sequence of segmented character nn-grams. After the segmentation, the segmented character nn-grams are assumed to be words, and each word’s representation is constructed from distribution of neighbour words that co-occur together across the estimated word boundaries. However, in practice, this kind of approach has several problems. First, word segmentation is difficult especially when texts in a corpus are noisy or unsegmented Saito et al. 2014; Kim et al. 2018. For example, word segmentation on social network service (SNS) corpora, such as Twitter, is a challenging task since it tends to include many misspellings, informal words, neologisms, and even emoticons. This problem becomes more severe in unsegmented languages, such as Chinese and Japanese, whose word boundaries are not explicitly indicated. Second, word segmentation has ambiguities Luo et al. 2002; Li et al. 2003. For example, a compound word

線形代数学(linear algebra) can be seen as a single word or sequence of words, such as

線形||代数学(linear || algebra).

Word segmentation errors negatively influence subsequent processes Xu et al. 2004. For example, we may lose some words in training corpora, leading to a larger Out-Of-Vocabulary (OOV) rate Sun et al. 2005. Moreover, segmentation errors, such as segmenting

きのう(yesterday) as

||のう(tree || brain), produce false co-occurrence information. This problem is crucial for most existing word embedding methods as they are based on distributional hypothesis Harris 1954, which can be summarized as: “a word is characterized by the company it keepsFirth 1957.

To enhance word segmentation, some recent works Junyi 2013; Sato 2015; Jeon 2016 made rich resources publicly available. However, maintaining them up-to-date is difficult and it is infeasible for them to cover all types of words. To avoid the negative impacts of word segmentation errors, Oshikiri 2017 proposed a word embedding method called segmentation-free word embedding (sembei). The key idea of sembei is to directly embed frequent character nn-grams from a raw corpus without conducting word segmentation. However, most of the frequent nn-grams are non-words Kim et al. 2018, and hence sembei still suffers from the OOV problems. The fundamental problem also lies in its extension Kim et al. 2018, although it uses external resources to reduce the number of OOV. To handle OOV problems, Bojanowski et al. 2017 proposed a novel compositional word embedding method with subword modeling, called subword-information skip-gram (sisg). The key idea of sisg is to extend the notion of vocabulary to include subwords, namely, substrings of words, for enriching the representations of words by the embeddings of its subwords. In sisg, the embeddings of OOV (or unseen) words are computed from the embedings of their subwords. However, sisg requires word segmentation as a prepossessing step, and the way of collecting co-occurrence information is dependent on the results of explicit word segmentation.

For solving the issues of word segmentation and OOV, we propose a simple but effective unsupervised representation learning method for words, phrases and sentences, called segmentation-free compositional nn-gram embedding (scne). The key idea of scne is to train embeddings of character nn-grams to compose representations of all character nn-grams in a raw corpus, and it enables treating all words, phrases and sentences seamlessly (see Figure 1 for an illustrative explanation). Our experimental results on a range of datasets suggest that scne can compute high-quality representations for words and sentences although it does not consider any word boundaries and is not dependent on any human annotated resources.

Refer to caption
Figure 1: A Japanese tweet with manual segmentation. (a) is the segmentation result of a widely-used word segmenter which conventional word embedding methods are dependent on. (b) and (c) show the embedding targets and their co-occurrence information to be considered in our proposed method scne on the boundaries of 数||学 and 学||勉. Unlike conventional word embedding methods, scne considers all possible character nn-grams on all boundaries (e.g., 線||形, 形||代, 代||数, \cdots) in the raw corpus without segmentation.

2 Segmentation-free Compositional nn-gram Embedding (scne)

Figure 2: A graphical illustration of the proposed model trying to compute a representation for a character nn-gram 𝒙(i,j)\bm{x}_{(i,j)}. The co-occurrence of 𝒙(i,j)\bm{x}_{(i,j)} and its neighbouring context nn-grams are used to train embeddings of compositional nn-grams.

Our method scne successfully combines a subword model Zhang et al. 2015; Wieting et al. 2016; Bojanowski et al. 2017; Zhao et al. 2018 with an idea of character nn-gram embedding Oshikiri 2017; Kim et al. 2018. In scne, the vector representation of a target character nn-gram is defined as follows. Let x1x2xNx_{1}x_{2}\cdots x_{N} be a raw unsegmented corpus of NN characters. For a range i,i+1,,ji,i+1,\ldots,j specified by index t=(i,j)t=(i,j), 1ijN1\leq i\leq j\leq N, we denote the substring xixi+1xjx_{i}x_{i+1}\cdots x_{j} as 𝒙(i,j)\bm{x}_{(i,j)} or 𝒙t\bm{x}_{t}. In a training phase, scne first counts frequency of character nn-grams in the raw corpus to construct nn-gram set VV by collecting MM-most frequent nn-grams with nnmaxn\leq n_{\rm{max}}, where MM and nmaxn_{\rm{max}} are hyperparameters. For any target character nn-gram 𝒙(i,j)=xixi+1xj\bm{x}_{(i,j)}=x_{i}x_{i+1}\cdots x_{j} in the corpus, scne constructs its representation v𝒙(i,j)dv_{\bm{x}_{(i,j)}}\in\mathbb{R}^{d} by summing the embeddings of its sub-nn-grams as follows:

v𝒙(i,j)=sS(𝒙(i,j))zs,v_{\bm{x}_{(i,j)}}=\sum_{s\in S(\bm{x}_{(i,j)})}z_{s},

where S(𝒙(i,j))={𝒙(i,j)Viijj}S(\bm{x}_{(i,j)})=\{\bm{x}_{(i^{\prime},j^{\prime})}\in V\mid i\leq i^{\prime}\leq j^{\prime}\leq j\} consists of all sub-nn-grams of target 𝒙(i,j)\bm{x}_{(i,j)}, and the embeddings of sub-nn-grams zsdz_{s}\in\mathbb{R}^{d}, sVs\in V are model parameters to be learned. The objective of scne is similar to that of Mikolov et al. 2013,

t𝒟{c𝒞(t)logσ(v𝒙tu𝒙c)+s~Pnegklogσ(v𝒙tus~)},\displaystyle\scalebox{0.85}{$\displaystyle\sum_{t\in\mathcal{D}}\left\{\sum_{c\in\mathcal{C}(t)}\log\sigma\left(v^{\top}_{\bm{x}_{t}}u_{\bm{x}_{c}}\right)+\sum_{\tilde{s}\sim P_{\rm{neg}}}^{k}\log\sigma\left(-v^{\top}_{\bm{x}_{t}}u_{\tilde{s}}\right)\right\}$},

where σ(x)=11+exp(x)\sigma(x)=\frac{1}{1+\exp(-x)}, 𝒟={(i,j)1ijN,ji+1ntarget}\mathcal{D}=\{(i,j)\mid 1\leq i\leq j\leq N,j-i+1\leq n_{\rm{target}}\}, and 𝒞((i,j))={(i,j)𝒙(i,j)V,j=i1 or i=j+1}\mathcal{C}((i,j))=\{(i^{\prime},j^{\prime})\mid\bm{x}_{(i^{\prime},j^{\prime})}\in V,j^{\prime}=i-1\text{ or }i^{\prime}=j+1\}. 𝒟\mathcal{D} is the set of indexes of all possible target nn-grams in the raw corpus with nntargetn\leq n_{\rm{target}}, where ntargetn_{\rm{target}} is a hyperparameter. 𝒞(t)\mathcal{C}(t) is the set of indexes of contexts of the target 𝒙t\bm{x}_{t}, that is, all character nn-grams in VV that are adjacent to the target (see Figures 1 and 2). The negative sampling distribution PnegP_{\rm{neg}} of s~V\tilde{s}\in V is proportional to its frequency in the corpus. The model parameters zs,us~dz_{s},u_{\tilde{s}}\in\mathbb{R}^{d}, s,s~Vs,\tilde{s}\in V, are learned by maximizing the objective. We set ntarget=nmaxn_{\rm{target}}=n_{\rm{max}} in our experiments.

Although we examine frequent nn-grams for simplicity, incorporating supervised word boundary information or byte pair encoding into the construction of compositional nn-gram set would be an interesting future work Kim et al. 2018; Sennrich et al. 2016; Heinzerling and Strube 2018.

Figure 3: An example of a frequent nn-gram lattice.

2.1 Comparison to Oshikiri 2017

To avoid the problems of word segmentation, Oshikiri 2017 proposed segmentation-free word embedding (sembei) (Oshikiri 2017) that considers the MM-most frequent character nn-grams as individual words. Then, a frequent nn-gram lattice is constructed, which is similar to a word lattice used in morphological analysis (see Figure 3). Finally, the pairs of adjacent nn-grams in the lattice are considered as target-context pairs and they are fed to existing word embedding methods, e.g., skipgram Mikolov et al. 2013. Although sembei is simple, the frequent nn-gram vocabulary tends to include a vast amount of non-words (Kim et al. 2018). Furthermore, its vocabulary size is limited to MM, hence, sembei can not avoid the undesirable issue of OOV. The proposed scne avoids these problems by taking all possible character nn-grams as embedding targets. Note that the target-context pairs of sembei are fully contained in those of scne (see Figure 1).

2.2 Comparison to Kim et al. 2018

To overcome the problem of OOV in sembei, Kim et al. 2018 proposed an extension of sembei called word-like nn-gram embedding (wne). In wne, the nn-gram vocabulary is filtered to have more vaild words by taking advantage of a supervised probabilistic word segmenter. Although wne reduce the number of non-words, there is still the problem of OOV since its vocabulary size is limited. In addition, wne is dependent on word segmenter while scne does not.

2.3 Comparison to Bojanowski et al. 2017

To deal with OOV words as well as rare words, Bojanowski et al. 2017 proposed subword information skip-gram (sisg) that enriches word embeddings with the representations of its subwords, i.e., sub-character nn-grams of words. In sisg, a vector representation of a target word is encoded as the sum of the embeddings of its subwords. For instance, subwords of length n=3n=3 of the word where are extracted as <wh, whe, her, ere, re>, where “<”,“>” are special symbols added to the original word to represent its left and right word boundaries. Then, a vector representation of where is encoded as the sum of the embeddings of these subwords and that of the special sequence <where>, which corresponds to the original word itself. Although sisg is powerful, it requires the information of word boundaries as its input, that is, semantic units need to be specified when encoding targets. Therefore, it cannot be directly applied to unsegmented languages. Unlike sisg, scne does not require such information. The proposed scne is much simpler, but due to its simpleness, the embedding target of scne should contains many non-words, which seems to be a problem (see Figure 1). However, our experimental results show that scne successfully captures the semantics of words and even sentences for unsegmented languages without using any knowledge of word boundaries (see Section 3).

3 Experiments

In this section, we perform two intrinsic and two extrinsic tasks at both word and sentence level, focusing on unsegmented languages. The implementation of our method is available on GitHub11 1 www.github.com/kdrl/SCNE.

3.1 Common Settings

Baselines: We use skipgram Mikolov et al. 2013, sisg Bojanowski et al. 2017 and sembei Oshikiri 2017 as word embedding baselines. For sentence embedding, we first test simple baselines obtained by averaging the word vectors over a word-segmented sentence. In addition, we examine several recent successful sentence embedding methods, pv-dbow, pv-dm Le and Mikolov 2014 and sent2vec Pagliardini et al. 2018 in an extrinsic task. Note that both scne and sembei have embeddings of frequent character nn-grams as their model parameters, but the differences come from training strategies, such as embedding targets and the way of collecting co-occurrence information (see Section 2.1 for more details). For contrasting scne with sembei, we also propose a variant of sembei (denoted by sembei-sum) as one of baselines, which composes word and sentence embeddings by simply summing up the embeddings of their sub-nn-grams which are learned by sembei.

Hyperparameters Tuning: To see the effect of rich resources for the segmentation-dependent baselines, we employ widely-used word segmenter with two settings: Using only a basic dictionary (𝑏𝑎𝑠𝑖𝑐\it{basic}) or using a rich dictionary together (𝑟𝑖𝑐ℎ\it{rich}). The dimension of embeddings is 200200, the number of epochs is 1010 and the number of negative samples is 1010 for all the methods. The nn-gram vocabulary size M=2×106M=2\times 10^{6} is used for sisg, sembei and scne. The other hyperparameters, such as learning rate and nmaxn_{\rm{max}}, are carefully adjusted via a grid search in the validation set. In the word similarity task, 22-fold cross validation is used for evaluation. In the sentence similarity task, we use the provided validation set. In the downstream tasks, vector representations are combined with a supervised logistic regression classifier. We repeat training and testing of the classifier 1010 times, while the prepared dataset is randomly split into train (60%60\%) and test (40%40\%) sets at each time, and the hyperparameters are tuned by 33-fold cross validation in the train set. We adopt mean accuracy as the evaluation metric. See Appendix A.1 for more experimental details.

Figure 4: Word (left) and sentence (right) similarity tasks on portions of Chinese Wikipedia corpus.

skipgramrich sisgrich sembei sembei-sum scne Wiki. 51.0 59.2 49.0 48.6 62.2 SNS 41.3 47.0 38.9 41.5 60.0 Diff. -9.7 -12.2 -10.1 -7.1 -2.2

Table 1: Spearman rank correlations of the word similarity task on two different Chinese corpora. Best scores are boldface and 2nd best scores are underlined.

Wikipedia corpora Noisy SNS corpora Chinese Japanese Korean Chinese Japanese Korean All Intersec. All Intersec. All Intersec. All Intersec. All Intersec. All Intersec. skipgrambasic 8.9 (11) 81.0 7.8 (10) 75.7 11.5 (15) 77.1 2.9 (5) 58.2 2.9 (7) 41.4 2.4 (7) 35.4 skipgramrich 9.5 (12) 81.0 16.7 (20) 75.8 11.9 (15) 76.9 3.0 (5) 58.2 4.1 (9) 40.9 2.5 (7) 34.2 sisgbasic 79.2 (100) 82.3 72.2 (100) 75.7 72.2 (100) 76.2 71.0 (100) 64.8 67.1 (100) 46.9 63.4 (100) 39.8 sisgrich 79.5 (100) 82.2 73.3 (100) 74.7 72.4 (100) 76.6 70.8 (100) 64.9 67.5 (100) 46.0 63.3 (100) 37.7 sembei 21.8 (25) 79.0 18.2 (23) 70.1 14.2 (19) 41.8 4.5 (7) 59.6 4.9 (10) 41.9 5.0 (13) 33.7 sembei-sum 76.8 (100) 74.2 69.9 (100) 61.3 66.3 (100) 56.0 72.3 (100) 56.4 66.3 (100) 40.7 64.3 (100) 34.8 scne (Proposed) 79.8 (100) 81.5 73.9 (100) 74.0 73.2 (100) 73.9 74.9 (100) 65.0 68.1 (100) 47.6 65.3 (100) 38.2

Table 2: Noun category prediction accuracies (higher is better) and coverages [%\%] (in parentheses, higher is better).

Segmentation-free Chinese Japanese Korean pv-dbowbasic 82.84 85.24 84.16 pv-dbowrich 83.47 85.55 84.80 pv-dmbasic 76.96 80.67 66.35 pv-dmrich 77.94 81.37 67.32 sent2vecbasic 85.09 87.12 82.31 sent2vecrich 85.39 87.20 82.34 skipgrambasic 85.79 86.76 84.06 skipgramrich 85.77 87.16 84.48 sisgbasic 85.67 87.22 84.34 sisgrich 85.04 87.25 84.35 sembei-sum \checkmark 83.41 80.80 74.98 scnenmax=8{}_{n_{\rm{max}}=8} \checkmark 87.07 87.42 84.15 scnenmax=16{}_{\bm{n_{\rm{max}}=16}} \checkmark 87.76 88.03 86.74

Table 3: Sentiment classification accuracies [%\%].

3.2 Word and Sentence Similarity

We measure the ability of models to capture semantic similarity for words and sentences in Chinese; see Appendix A.2 for the experiment in Japanese. Given a set of word pairs, or sentence pairs, and their human annotated similarity scores, we calculated Spearman’s rank correlation between the cosine similarities of the embeddings and the scores. We use the dataset of Jin and Wu 2012 and Wang et al. 2017 for Chinese word and sentence similarity respectively. Note that the conventional models, such as skipgram, cannot provide the embeddings for OOV words, while the compositional models, such as sisg and scne, can compute the embeddings by using their subword modeling. In order to show comparable results, we use the null vector for these OOV words following Bojanowski et al. 2017.

Results: To see the effect of training corpus size, we train all models on portions of Wikipedia22 2 We use 10, 50, 100, 300MB of Wikipedia from the head.. The results are shown in Figure 4. As it can be seen, the proposed scne is competitive with or outperforms the baselines for both word and sentence similarity tasks. Moreover, it is worth noting that scne provides high-quality representations even when the size of training corpus is small, which is crucial for practical real-world settings where rich data is not available. For a next experiment to see the effect of noisiness of training corpus, we test both noisy SNS corpus and the Wikipedia corpus33 3 We use 100MB of Sina Weibo posts for Chinese SNS corpus and 100MB of Chinese Wikipedia corpus. of the same size. The results are reported in Table 1. As it can be seen, the performance of segmentation-dependent methods (skipgram, sisg) are decreased greatly by the noisiness of the corpus, while scne degrades only marginally. The other two segmentation-free methods (sembei, sembei-sum) performed poorly. This shows the efficacy of our method in the noisy texts. On the other hand, in preliminary experiments on English (not shown), scne did not get better results than our segmentation-dependent baselines and it will be a future work to incorporate easily obtainable word boundary information into scne for segmented languages.

3.3 Noun Category Prediction

As a word-level downstream task, we conduct a noun category prediction on Chinese, Japanese and Korean44 4 Although Korean has spacing, word boundaries are not obviously determined by space.. Most settings are the same as those of Oshikiri 2017. Noun words and their semantic categories are extracted from Wikidata Vrandečić and Krötzsch 2014 with a predetermined semantic category set55 5 {food, song, music band name, manga, fictional character name, television series, drama, chemical compound, disease, taxon, city, island, country, year, business enterprise, public company, profession, university, language, book}, and the classifier is trained to predict the semantic category of words from the learned word representations, where unseen words are skipped in training and treated as errors in testing. To see the effect of the noisiness of corpora, both noisy SNS corpus and Wikipedia corpus of the same size are examined as training corpora66 6 For each language, we use 100MB of Wikipedia and SNS data as training corpora. For the SNS data, we use Sina Weibo for Chinese and Twitter for the rest..

Results: The results are reported in Table 2. Since the set of covered nouns (i.e., non-OOV words) depends on the methods, we calculate accuracies in two ways for a fair comparison: Using all the nouns and using the intersection of the covered nouns. scne achieved the highest accuracies in all the settings when using all the nouns, and also performed well when using the intersection of the covered nouns, especially for the noisy corpora.

3.4 Sentiment Analysis

As a sentence-level evaluation, we perform sentiment analysis on movie review data. We use 101k, 56k and 200k movie reviews and their scores respectively from Chinese, Japanese and Korean movie review websites (see Appendix A.1.6 for more details). Each review is labeled as positive or negative by its rating score. Sentence embedding models are trained using the whole movie reviews as training corpus. Among the reviews, 5k positive and 5k negative reviews are randomly selected, and the selected reviews are used to train and test the classifiers as explained in Section 3.1.

Results: The results are reported in Table 3. The accuracies show that scne is also very effective in the sentence-level application. In this experiment, we observe that the larger nmaxn_{\rm{max}} contributes to the performance improvement in sentence-level application by allowing our model to capture composed representations for longer phrases or sentences.

4 Conclusion

We proposed a simple yet effective unsupervised method to acquire general-purpose vector representations of words, phrases and sentences seamlessly, which is especially useful for languages whose word boundaries are not obvious, i.e., unsegmented languages. Although our method does not rely on any manually annotated resources or word segmenter, our extensive experiments show that our method outperforms the conventional approaches that depend on such resources.

Acknowledgments

We would like to thank anonymous reviewers for their helpful advice. This work was partially supported by JSPS KAKENHI grant 16H02789 to HS and 18J15053 to KF.

References

Appendix A Appendices

A.1 Experimental Details

A.1.1 Hyperparameters Tuning

For skipgram, we performed a grid search over (h,γ){1,5,10}×{0.01,0.025}(h,\gamma)\in\{1,5,10\}\times\{0.01,0.025\}, where hh is the size of context window and γ\gamma is the initial learning rate. For sisg, we performed a grid search over (h,γ,nmin,nmax){1,5,10}×{0.01,0.025}×{1,3}×{4,8,12}(h,\gamma,n_{\rm{min}},n_{\rm{max}})\in\{1,5,10\}\times\{0.01,0.025\}\times\{1,3\}\times\{4,8,12\}, where hh is the size of context window, γ\gamma is the initial learning rate, nminn_{min} is the minimum length of character nn-gram and nmaxn_{max} is the maximum length of character nn-gram. For pv-dbow, pv-dm and sent2vec, we performed a grid search over (h,γ){5,10}×{0.01,0.05,0.1,0.2,0.5}(h,\gamma)\in\{5,10\}\times\{0.01,0.05,0.1,0.2,0.5\}, where hh is the size of context window and γ\gamma is the initial learning rate. For sembei and scne, we used the initial learning rate 0.010.01 and nmin=1n_{\rm{min}}=1. The maximum length of nn-gram to consider nmaxn_{\rm{max}} is grid searched over {4,6,8}\{4,6,8\} in the word and sentence similarity tasks. In the noun category prediction task, we used nmax=8n_{\rm{max}}=8 for sembei and the nmaxn_{\rm{max}} of scne is grid searched over {4,6,8}\{4,6,8\}. For sentiment analysis task, we tested both nmax=8n_{\rm{max}}=8 and nmax=16n_{\rm{max}}=16 for sembei and scne to see the effect of large nmaxn_{\rm{max}}. After carefully monitoring the loss curve and the performance in the word and sentence similarity tasks, we set the number of epochs 1010 for all methods. In preliminary experiments, we also tested the number of epochs 2020 for the word-segmentation-dependent baselines but there were no significant differences. In the two supervised downstream tasks, the learned vector representations are combined with the logistic regression classifier. The parameter CC, which is the inverse of regularization strength of the classifier, is adjusted via a grid search over C{0.1,0.5,1,5,10}C\in\{0.1,0.5,1,5,10\}. Again, as explained in the main paper, the hyperparamters are grid searched on the determined validation set for all experiments.

A.1.2 Implementations

Here we provide the list of implementations of baselines which are used in our experiments. For skipgram77 7 https://code.google.com/archive/p/word2vec/, sisg88 8 https://github.com/facebookresearch/fastText, sembei99 9 https://github.com/oshikiri/w2v-sembei, and sent2vec1010 10 https://github.com/epfml/sent2vec, we use the official implementations provided by the authors. Meanwhile, as for pv-dbow and pv-dm, we employ a widely-used implementation of Gensim library1111 11 https://radimrehurek.com/gensim/models/doc2vec.html.

A.1.3 Word Segmenters and Word Dictionaries for Unsegmented Languages

Below we list the word segmentation tools and word dictionaries which are used in our experiments. We employed a widely-used word segmentation tool for each language.

For Chinese language, we used jieba1212 12 https://github.com/fxsjy/jieba with its default dictionary1313 13 https://github.com/fxsjy/jieba/blob/master/jieba/dict.txt or with an extended dictionary1414 14 https://github.com/fxsjy/jieba/blob/master/extra_dict/dict.txt.big, which fully supports both traditional and simplified Chinese characters.

For Japanese, we used MeCab1515 15 http://taku910.github.io/mecab/ with its default dictionary called IPADIC15 along with specially designed neologisms-extended dictionary called mecab-ipadic-NEologd1616 16 https://github.com/neologd/mecab-ipadic-neologd. Note that, because this extended dictionary mecab-ipadic-NEologd is specially designed to include many neologisms, there is a significant word coverage improvement by using this word dictionary as it can be seen in the Japanese noun category prediction task in the main paper.

For Korean, we used mecab-ko1717 17 https://bitbucket.org/eunjeon/mecab-ko with its default dictionary called mecab-ko-dic1818 18 https://bitbucket.org/eunjeon/mecab-ko-dic along with another extended dictionary called NIADic1919 19 https://github.com/haven-jeon/NIADic.

A.1.4 Training Corpora

We prepared Wikipedia corpora and SNS corpora for Chinese, Japanese and Korean for our experiments. For the Wikipedia corpora, we used the first 10, 50, 100, 200 and 300MB of texts from the publicly available Wikipedia dumps2020 20 https://dumps.wikimedia.org/. The texts are extracted by using WikiExtractor tool2121 21 https://github.com/attardi/wikiextractor. For Chinese SNS corpus, we used 100MB of Leiden Weibo Corpus van Esch 2012 from the head. For Japanese and Korean SNS corpora, we collected Japanese and Korean tweets using Twitter Streaming API. We removed usernames and URLs from the SNS corpora. There were many informal words, emoticons and misspellings in the SNS corpora. We preserved them without preprocessing to see the effect of the noisiness of training corpora in our experiments.

A.1.5 Preprocess of Wikidata

For the noun category prediction task, we extracted noun words and their semantic categories from Wikidata Vrandečić and Krötzsch 2014 following Oshikiri 2017. We determined the semantic category set used in our experiments as follows: First, we collected Wikidata objects that have Chinese, Japanese, Korean and English labels. Next, we sorted the categories by the number of noun words, and removed categories (e.g., Wikimedia category or Wikimedia template) that do not represent any semantic category. We also removed out several categories that contain too many noun words (e.g., human) or too few noun words (e.g., academic discipline). Since there were several duplicated labels for different Wikidata objects, the number of nouns for each language is slightly different. Each category has at least 0.1k words and no more than 5k words. The numbers of extracted noun words that are used in our experiments were 22,468, 22,396 and 22,298 for Chinese, Japanese and Korean, respectively.

A.1.6 Movie Review Datasets

In the main paper, three movie review datasets are used to evaluate the quality of sentence embeddings. We used 101,114, 55,837 and 200,000 movie reviews and their rating scores from Yahoo

奇摩電影2222 22 https://github.com/fychao/ChineseMovieReviews, Yahoo!

映画2323 23 https://github.com/dennybritz/sentiment-analysis/tree/master/dataand Naver Movies2424 24 https://github.com/e9t/nsmc for Chinese, Japanese and Korean, respectively.

skipgramrich sisgrich sembei sembei-sum scne Wiki. 8.3 15.4 4.0 9.3 24.1 SNS 5.3 12.7 2.8 9.3 23.0 Diff. -3.0 -2.7 -1.2 -0.0 -1.1

Table 4: Spearman rank correlations of the word similarity task on two different Japanese corpora.

A.2 Additional Experiment on Japanese

In this section, we show the results of Japanese word similarity experiments. We use the datasets of Sakaizawa and Komachi 2018. It contains 4427 pairs of words with human similarity scores. We omit sentence similarity task since there is no public widely-used benchmark dataset for Japanese yet. Following the main paper, given a set of word pairs and their human annotated similarity scores, we calculated Spearman’s rank correlation between the cosine similarities of the embeddings and the human scores. We use 2-fold cross validation for hyperparameters tuning. The same grid search is performed as explained in Section A.1.1. To see the effect of the noisiness of training corpora, we use two Japanese corpora, 100MB of Wikipedia corpus and 100MB of noisy SNS corpus (Twitter), which are also used in the Japanese noun category prediction task in the main paper. As seen in Table 4, the experiment results for Japanese are similar to those of Chinese in the main paper.