Yuanhe Tian  , Yan Song  , Xiang Ao  , Fei Xia  , Xiaojun Quan (cid:52) , Tong Zhang  , Yonggang Wang   University of Washington,  Sinovation Ventures  Chinese Academy of Sciences, (cid:52) Sun Yat-sen University  The Hong Kong University of Science and Technology  { yhtian, fxia } @uw.edu  clksong@gmail.com  aoxiang@ict.ac.cn (cid:52) quanxj3@mail.sysu.edu.cn tongzhang@ust.hk  wangyonggang@chuangxin.com Abstract Chinese word segmentation (CWS) and part-of-speech (POS) tagging are important fundamental tasks for Chinese language processing, where joint learning of them is an effective one-step solution for both tasks. Previous studies for joint CWS and POS tagging mainly follow the character-based tagging paradigm with introducing contextual information such as n-gram features or sentential representations from recurrent neural models. However, for many cases, the joint tagging needs not only modeling from context features but also knowledge attached to them (e.g., syntactic relations among words); limited efforts have been made by existing research to meet such needs. In this paper, we propose a neural model named TWASP for joint CWS and POS tagging following the character-based sequence labeling paradigm, where a two-way attention mechanism is used to incorporate both context feature and their corresponding syntactic knowledge for each input character. Particularly, we use existing language processing toolkits to obtain the auto-analyzed syntactic knowledge for the context, and the proposed attention module can learn and benefit from them although their quality may not be perfect. Our experiments illustrate the effectiveness of the two-way attentions for joint CWS and POS tagging, where state-of-the-art performance is achieved on five benchmark datasets. 1 1 Introduction Chinese word segmentation (CWS) and part-of-speech (POS) tagging are two fundamental and crucial tasks in natural language processing (NLP) for Chinese. The former one aims to find word  Partially done as an intern at Sinovation Ventures. Corresponding author. 1 TWASP (code and the best performing models) is released at https://github.com/SVAIGBA/TwASP . boundaries in a sentence and the latter, on the top of segmentation results, assigns a POS tag to each word to indicate its syntactical property in the sentence. To effectively perform CWS and POS tagging, combining them into a joint task is proved to have better performance than separately conducting the two tasks in a sequence (Ng and Low, 2004). Therefore, many studies were proposed in the past decade for joint CWS and POS tagging (Jiang et al., 2008, 2009; Sun, 2011; Zeng et al., 2013; Zheng et al., 2013; Kurita et al., 2017; Shao et al., 2017; Zhang et al., 2018). These studies, regardless of whether they used conventional approaches (Jiang et al., 2008, 2009; Sun, 2011; Zeng et al., 2013) or deep learning based approaches (Zheng et al., 2013; Kurita et al., 2017; Shao et al., 2017; Zhang et al., 2018), focused on incorporating contextual information into their joint tagger. In addition, it is well known that syntactic structure is also able to capture and provide the information of long-distance dependencies among words. For example, Figure 1 shows an example of local ambiguity, where the green highlighted part has two possible interpretations     VV /  NN  ( report a book ) and     NN  ( the report ). The ambiguity can be resolved with syntactic analysis; for instance, the dependency structure, if available, would prefer the first interpretation. While the subject and the object of the sentence (highlighted in yellow) are far away from the ambiguous part in Figure 2: The architecture of TWASP for the joint CWS and POS tagging with the two-way attention mechanism, which is presented with example context features and their dependency knowledge (highlighted in yellow) from auto-analyzed results for a character (i.e.,    ( split ) highlighted in green) in the given sentence. the surface word order, they are much closer in the dependency structure (the subject depends on    VV  and   NN  depends on the the ob-ject). This example shows that syntactic structure provides useful cues for CWS and POS tagging. Syntactic knowledge can be obtained from manually constructed resources such as treebanks and grammars, but such resources require considerate efforts to create and might not be available for a particular language or a particular domain. A more practical alternative is to use syntactic structures automatically generated by off-the-shelf toolkits. Some previous studies (Huang et al., 2007; Jiang et al., 2009; Wang et al., 2011; Zhang et al., 2018) verified the idea for this task by learning from auto-processed corpora. However, their studies treat auto-processed corpora as gold reference and thus are unable to distinguishingly use it according to its quality (the resulted knowledge is not accurate in most cases). Therefore, the way to effectively leverage such auto-generated knowledge for the joint CWS and POS tagging task is not fully explored. In this paper, we propose a neural model named TWASP with a two-way attention mechanism to improve joint CWS and POS tagging by learning from auto-analyzed syntactic knowledge, which are generated by existing NLP toolkits and provide necessary (although not perfect) information for the task. In detail, for each input character, the proposed attention module extracts the context features associated with the character and their corresponding knowledge instances according to the auto-analyzed results, then computes the attentions separately for features and knowledge in each attention way, and finally concatenates the attentions from two ways to guide the tagging process. In doing so, our model can distinguish the important auto-analyzed knowledge based on their contributions to the task and thus avoid being influenced by some inferior knowledge instances. Compared to another prevailing model, i.e., key-value memory networks (Miller et al., 2016), which can learn from pair-wisely organized information, the two-way attentions not only are able to do so, but also fully leverage features and their knowledge rather than using one to weight the other. 2 We experiment with three types of knowledge, namely, POS labels, syntactic constituents, and dependency relations, in our experiments. The experimental results on five benchmark datasets illustrate the effectiveness of our model, where state-of-the-art performance for the joint task is achieved on all datasets. We also perform several analyses, which confirm the validity of using two-way attentions and demonstrate that our model can be further improved by synchronously using multiple types of knowledge. The architecture of TWASP is illustrated in Figure 2. The left part shows the backbone of the model for the joint CWS and POS tagging following 2 We explain it in later part of the paper that, the output of key-value memory networks mainly rely on the value embeddings, where keys are used to weight such embeddings. the character-based sequence labeling paradigm, where the input is a character sequence X = x 1 x 2    x i    x l and the output is a sequence of joint labels Y = y 1 y 2    y i    y l . To enhance the backbone paradigm, the proposed two-way attention module (as shown in the right part of Figure 2) takes the syntactic knowledge produced from the input sentence, analyzes it and then feeds it to the tagging process. In this section, we firstly introduce the auto-analyzed knowledge, then explain how the two-way attentions consume such knowledge, and finally describe how the joint CWS and POS tagging works with the resulted attentions. Auto-analyzed knowledge is demonstrated to be an effective type of resources to help NLP systems understand the texts (Song et al., 2017; Seyler et al., 2018; Huang and Carley, 2019). One challenge for leveraging external knowledge for the joint task is that gold-standard annotations are extremely rare for text in most domains, especially the syntactic annotations. An alternative solution is to use off-the-shelf NLP systems to produce such knowledge, which is proved to be useful in previous studies (Huang et al., 2007; Jiang et al., 2009; Wang et al., 2011; Zhang et al., 2018). Rather than processing an entire corpus and then extracting features or training embeddings from the resulted corpus as in previous studies, our model does not treat knowledge as gold references: it generates auto-analyzed knowledge for each sentence and learns the weights of the corresponding features. Formally, for a character sequence X , let S and K denote the lists of context features and knowledge for X , respectively. For each character x i in X , let S i = [ s i, 1 , s i, 2 ,    s i,j ,    s i,m i ] and K i = [ k i, 1 , k i, 2 ,    k i,j ,    k i,m i ] be the sublists of S and K for x i . Here, s i,j and k i,j denote a context feature and a knowledge instance, respectively. In this paper, we use three types of syntactic knowledge for the joint task, namely POS labels, syntactic constituents, and dependency relations, where POS labels indicate the syntactic information of individual words, syntactic constituents provide the structural grouping information for a text span, and dependencies offer dependency relations between words. Figure 3 shows an example sentence and the corresponding S and K . For character    (highlighted in green), its S i and K i are highlighted in yellow. In order to distinguish same knowledge appearing with different context features, we use a feature-knowledge combination tag to represent each knowledge instance (e.g.,    NN ,    NP , and    dobj  in Figure 3). We explain each type of knowledge below. POS Labels Figure 3 (a) shows that, for each x i (e.g., x 6 =   ), we use a 2-word window for both sides to extract context features from S to form S i (i.e., S 6 = [   ,    ,   ,   ]), and then get their corresponding knowledge instances of POS labels from K to form K i (i.e., K 6 = [   NN ,    VV ,   VV ,   LC ]). Syntactic Constituents As shown in Figure 3 (b), the rule for extracting syntactic constituency knowledge is as follows. We start with the word containing the given character x i , go up the constituency tree to the first ancestor whose label is in a pre-defined syntactic label list, 3 then use all the words under this node to select context features from S , and finally combine the words with the syntactic label of the node to select knowledge instances from K . For example, for x 6 =  , the lowest syntactic node governing     is NP (high-lighted in yellow); thus S 6 = [   ] and K 6 = [   NP ]. Another example is x 5 =  , the lowest acceptable node on its syntactic path is VP ; therefore, S 5 = [   ,   ,    ] and K 5 = [   VP ,   VP ,    VP ]. Dependency Relations Given a character x i , let w i be the word that contains x i . The context features S i include w i , w i 's governor, and w i 's dependents in the dependency structure; those words combined with their inbound dependency relation labels form K i . For example, for x 6 =  , w 6 =    , which depends on     with a dependency label dobj . Therefore, S 6 = [   ,    ], and K 6 = [   obj ,    root ]. Attention has been shown to be an effective method for incorporating knowledge into NLP systems (Kumar et al., 2018; Margatina et al., 2019) but it cannot be used directly for feature and knowledge in pair-wise forms. Previous studies on the joint task normally directly concatenate the embeddings from context features and knowledge instances into the embeddings of characters (Zhang et al., 2018), which could be problematic for incorporating auto-analyzed, error-prone syntactic knowledge obtained from off-the-shelf toolkits. For both features and their knowledge instances for X , we use a two-way attention design to have separate attention for S and K . Particularly, the two ways, namely, the feature way and the knowledge way, are identical in architecture, where each way has a feed-forward attention module (Raffel and Ellis, 2015). For each x i , its S i and K i are firstly fed into the feature attention way and the knowledge attention way, respectively, then computed within each way, and their final attention vectors are combined to feedback to the backbone model. Take the feature way as an example, the attention 3 Following Chen et al. (2006), the list has 12 syntactic labels, namely, ADJP, ADVP, CLP, DNP, DP, DVP, LCP, LST, NP, PP, QP, and VP. weight for each context feature s i,j is computed by a si,j = exp ( h (cid:62) i  e si,j ) (cid:80) m i j =1 exp ( h (cid:62) i  e si,j ) (1) where h i is the vector from a text encoder for x i and e si,j the embedding of s i,j . Then we have the weighted embedding a si for all s i,j in S i via a si = m i (cid:88) j =1 a si,j e si,j (2) where (cid:80) denotes a element-wise sum operation. For the knowledge way, the same process is applied to get a ki by distinguishing and weighting each knowledge instance k i,j . Finally, the output of the two attention ways are obtained through an concatenation of the two vectors: a i = a si  a ki . To functionalize the joint tagging, the two-way attentions interact with the backbone model through the encoded vector h i and its output a i for each x i For h i , one can apply many prevailing encoders, e.g., Bi-LSTM or BERT (Devlin et al., 2019), to get the vector list [ h 1 h 2    h i    h l ] for X . Once a i is obtained, we concatenate it with h i and send it through a fully connected layer to align the dimension of the output for final prediction: o i = W  ( h i  a i ) + b (3) where W and b are trainable parameters. Afterwards, conditional random fields (CRF) is used to estimate the probability for y i over all possible joint CWS and POS tags under x i and y i  1 by p ( y i | x i ) = exp ( W c  o i + b c ) (cid:80) y i  1 y i exp ( W c  o i + b c ) (4) Here, W c and b c are the weight matrix and the bias vector, respectively, and they are estimated using the ( y i  1 , y i ) tag pairs in the gold standard. We employ five benchmark datasets in our experiments, where four of them, namely, CTB5, CTB6, CTB7, and CTB9, are from the Penn Chinese TreeBank 4 (Xue et al., 2005) and the fifth one is 4 We obtain the Penn Chinese TreeBank data from the official release of Linguistic Data Consortium. The catalog numbers for CTB5, CTB6, CTB7, and CTB9 are LDC2005T01, LDC2007T36, LDC2010T07, and LDC2016T13, respectively. the Chinese part of Universal Dependencies (UD) 5 (Nivre et al., 2016). The CTB datasets are in simplified Chinese characters while the UD dataset is in traditional Chinese. Following Shao et al. (2017), we convert the UD dataset into simplified Chinese 6 before conducting experiments on it. CTB uses 33 POS tags, and we split CTB5-CTB9 following previous studies (Wang et al., 2011; Jiang et al., 2008; Shao et al., 2017). In addition, because the data in CTB9 come from eight genres  broadcast conversation (BC), broadcast news (BN), conversational speech(CS), discussion forums (DF), magazine articles (MZ), newswire (NW), SMS/chat messages (SC), and weblog (WB)  we also use CTB9 in a cross-domain study (see Section 3.4). UD uses two POS tagsets, namely the universal tagset (15 tags) and language-specific tagset (42 tags for Chinese). We refer to the corpus with the two tagsets as UD1 and UD2, respectively, and use the official splits of train/dev/test in our experiments. The statistics for the aforementioned datasets are in Table 1. To obtain the aforementioned three types of knowledge, we use two off-the-shelf toolkits, Stanford CoreNLP Toolkit (SCT) 7 (Manning et al., 2014) and Berkeley Neural Parser (BNP) 8 (Kitaev and Klein, 2018): the former tokenizes and parses a Chinese sentence, producing POS tags, phrase structure and dependency structure of the sentence; the latter does POS tagging and syntactic parsing on a pre-tokenized sentence. Both toolkits were trained on CTB data and thus produced CTB POS tags. To extract knowledge, we firstly use SCT to automatically segment sentences and then run both SCT and BNP for POS tagging and parsing. Table 2 shows the size of S and K for all the datasets. We test the model with three encoders: two of them, namely Bi-LSTM and BERT 9 (Devlin et al., 2019), are widely used; the third encoder is ZEN 10 (Diao et al., 2019), which is a recently released Chinese encoder pre-trained with n-gram information and outperforms BERT in many downstream tasks. For the Bi-LSTM encoder, we set its hidden state size to 200 and use the character embeddings released by Shao et al. (2017) to initialize its input representations. For BERT and ZEN, we follow their default settings, e.g., 12 layers of self-attentions with the dimension of 768. For the two-way attention module, we randomly initialize the embeddings for all context features and their corresponding knowledge instances, where one can also use pre-trained embeddings (Song et al., 2018; Grave et al., 2018; Zhang et al., 2019; Yamada et al., 2020) for them. For all the 7 We use its version 3.9.2 downloaded from https:// stanfordnlp.github.io/CoreNLP/ . 8 We download the model from https://github. com/nikitakit/self-attentive-parser . 9 We use the Chinese base model from https://s3. amazonaws.com/models.huggingface.co/ . 10 https://github.com/sinovation/ZEN CTB5 CTB6 CTB7 CTB9 UD1 UD2 Seg Joint Seg Joint Seg Joint Seg Joint Seg Joint Seg Joint SCT 98.02 95.49 96.62 90.85 96.53 92.73 93.63 88.23 80.50* 0.00* 80.50* 36.11* BNP -95.50 -94.43 -92.95 -88.09 -0.00* -37.16* Bi-LSTM 97.69 93.73 95.46 90.63 95.46 89.98 96.45 91.80 94.96 88.72 95.01 88.75 + POS (SCT) 98.07 94.68 96.23 91.04 96.32 91.60 96.75 92.36 94.86 88.90 95.08 88.99 + Syn. models, we set the maximum character length of the input sequence to 300 and use negative log-likelihood loss function. Other hyper-parameters of the models are tuned on the dev set and the tuned models are evaluated on the test set for each dataset (each genre for CTB9). F-scores for word segmentation and the joint CWS-POS tags are used as main evaluation metrics 11 in all experiments. In our main experiment, we run our TWASP on the five benchmark datasets using the three encoders, i.e., Bi-LSTM, BERT, and ZEN. The results on the F-scores of word segmentation and joint CWS and POS tagging are in Table 3, which also includes the performance of the baselines without attention and the two toolkits (i.e., SCT and BNP). The results of SCT and BNP on the UD dataset are bad because they were trained on CTB, which used different segmentation and POS tagging criteria. There are several observations. First, for all encoders, the two-way attentions provide consistent enhancement to the baselines with different types of knowledge. Particularly, although the baseline model is well-performed when BERT (or ZEN) serves as the encoder, the attention mod-11 We use the evaluation script from https://github. ule is still able to further improve its performance with the knowledge produced by the toolkits even though the toolkits have worse-than-baseline results for the joint task. Second, among different types of knowledge, POS labels are the most effective ones that help the joint task. For instance, among BERT-based models, the one enhanced by POS knowledge from SCT achieves the best performance on most datasets, which is not surprising because such knowledge matches the outcome of the task. In addition, for BERT-based models enhanced by knowledge from BNP (i.e., BERT + POS (BNP) and BERT + Syn. (BNP)), syntactic constituents provide more improvement than POS labels on all CTB datasets. This observation could be explained by that BNP is originally designed for constituency parsing with CTB criteria; the syntactic constituents are complicated while effective when they are accurate. Third, while SCT and BNP were trained on CTB, whose tagset is very different from the two tagsets for UD, TWASP still outperforms the baselines on UD with the knowledge provided by SCT and BNP, indicating that syntactic knowledge is useful even when it uses different word segmentation and POS tagging criteria. Table 4 shows the results of our best models (i.e. BERT and ZEN with POS (SCT)) and previous studies on the same datasets. Our approach CTB5 CTB6 CTB7 CTB9 UD1 UD2 Seg Joint Seg Joint Seg Joint Seg Joint Seg Joint Seg Joint Jiang et al. (2008) 97.85 93.41 -----Kruengkrai et al. (2009) 97.87 93.67 -----Sun (2011) 98.17 94.02 -----Wang et al. (2011) 98.11 94.18 95.79 91.12 95.65 90.46 ---Qian and Liu (2012) 97.85 93.53 -----Shen et al. (2014) 98.03 93.80 -----Kurita et al. (2017) 98.41 94.84 -96.23 91.25 ---Shao et al. (2017) 98.02 94.38 --96.67 92.34 95.16 89.75 95.09 89.42 Zhang et al. (2018) 98.50 94.95 96.36 92.51 96.25 91.87 ---BERT + POS (SCT) 98.77 96.77 97.43 94.82 97.31 94.12 97.75 94.87 98.32 95.60 98.33 95.46 ZEN + POS (SCT) 98.81 96.92 97.45 94.87 97.27 94.20 97.77 94.88 98.33 95.69 98.18 95.49 Table 4: Comparison (in F-scores of word segmentation and joint tagging) of TWASP (with BERT or ZEN encoder) with previous studies. outperforms previous studies on the joint task and achieves new state-of-the-art performance on all datasets. While some of the previous studies use auto-analyzed knowledge (Wang et al., 2011; Zhang et al., 2018), they regard such knowledge as gold reference and consequently could suffer from errors in the auto-analyzed results. In contrast, our proposed model is able to selectively model the input information and to discriminate useful knowledge instances through the two-way attentions. Domain variance is an important factor affecting the performance of NLP systems (Guo et al., 2009; McClosky et al., 2010; Song and Xia, 2013). To further demonstrate the effectiveness of TWASP, we conduct cross-domain experiments on the eight genres of CTB9 using BERT and ZEN as the baseline and their enhanced version with POS knowledge from SCT. In doing so, we test on each genre with the models trained on the data from all other genres. The results on both segmentation and the joint task are reported in Table 5, where the SCT results are also included as a reference. The comparison between the baselines and TWASP with POS knowledge clearly shows the consistency of performance improvement with two-way attentions, where for both BERT and ZEN, TWASP outperforms the baselines for all genres on the joint labels. In addition, similar to the observations from the previous experiment, both accurate and inaccurate POS knowledge are able to help the joint task. For example, although the SCT results on several genres (e.g., CS, DF, SC) are much worse than of the BERT baseline, the POS labels produced by SCT can still enhance TWASP on word segmentation and joint tagging with the proposed two-way attention module. In the first analysis, we compare our two-way attention with normal attention. For normal attention, we experiment three ways of incorporating context features and knowledge: (1) using context features and knowledge together in the attention, where all features or knowledge instances are equally treated in it; (2) using context features only; and (3) using knowledge only. We run these experiments with BERT encoder and POS knowledge from SCT on CTB5 and report the results in Table 6. Overall, the two-way attentions outperform all three settings for normal attention, which clearly indicates the validity of using two attention ways for features and knowledge, i.e., compared to (1), as well as the advantage of learning from both of them, i.e., compared to (2) and (3). Interestingly, in the three settings, (3) outperforms (1), which could be explained by that, with normal attention, mixed feature and knowledge instances in it may make it difficult to weight them for the joint task. There are other methods for using both context features and knowledge in a neural framework, such as key-value memory networks (kvMN) (Miller et al., 2016), which is demonstrated to improve CWS by Tian et al. (2020). Thus we compare our approach with kvMN, in which context features are mapped to keys and knowledge to values. We follow the standard protocol of the kvMN, e.g., addressing keys by S i and reading values from K i through the corresponding knowledge for each key, computing weights from all key embeddings, and outputting the weighted embeddings from all values. The result from the kvMN is reported at the last row of Table 6, where its performance is not as good as the two-way attentions, and even Genre SCT BERT BERT+POS ZEN ZEN+POS Seg Joint Seg Joint Seg Joint Seg Joint Seg Joint BC 96.27 93.55 96.29 92.08 96.38 92.34 96.48 92.25 96.63 92.41 BN 96.98 93.98 96.93 93.73 97.20 94.02 97.05 93.91 97.21 94.14 CS 89.83 81.93 95.17 89.18 95.14 89.46 95.10 89.24 95.87 89.67 DF 91.34 84.28 96.79 92.02 96.44 92.44 96.33 92.11 96.55 92.51 MZ 95.69 91.99 95.62 91.97 95.83 92.17 95.69 92.00 95.78 92.18 NW 97.41 94.75 97.55 94.44 97.49 94.64 97.49 94.51 97.57 94.70 SC 84.87 76.55 95.97 91.13 96.27 91.77 96.09 91.47 96.38 91.85 WB 95.99 92.86 95.09 89.59 95.11 89.85 95.10 89.74 95.35 90.10 Table 5: Experimental results (the F-scores for word segmentation and joint tagging) from baselines and TWASP with different encoders on eight genres of CTB9. worse than using normal attention with setting (3). The reason could be straightforward: the output of kvMN is built upon value (knowledge) embeddings and therefore information from key (context feature) embeddings does not directly contribute to it other than providing weights for the value. As a result, kvMN acts in a similar yet inferior 12 way of setting (3) where only knowledge is used. Since every type of knowledge works well in our model, it is expected to investigate how the model performs when multiple types of knowledge are used together. To this end, we run experiments on CTB5 to test on our BERT-based TWASP with knowledge ensemble, where two ensemble strategies, i.e., averaging and concatenation, are applied with respect to how a i for each knowledge type is combined with others. The results are reported in Table 7. In this table, the first seven rows (ID: 1-7) indicate that different types of knowledge are 12 The inferior is explained by that, in kvMN, the value weights are inaccurate because they are computed with respect to the contribution of keys rather than knowledge instances. combined according to whether they come from the same toolkit (ID: 1-5) or belong to the same category (ID: 6 and 7); and the last row (ID: 8) is for the case that all types of knowledge are combined. There are several observations. First, compared to only using one type of knowledge (refer to Table 3), knowledge ensemble improves model performance where more knowledge types contribute to better results. The best model is thus obtained when all knowledge (from each toolkit and from both toolkits) are used. Second, knowledge in the same type from different toolkits may complement to each other and thus enhance model performance accordingly, which is confirmed by the results from the models assembling POS (or Syn+Dep) information from both SCT and BNP. Third, for different ensemble strategies, concatenation tends to perform better than averaging, which is not surprising since concatenation actually turns the model into a multi-way structure for knowledge integration. When the toolkit provides accurate knowledge, it is not surprising that our two-way attention model would benefit from the auto-analyzed knowledge. Interestingly, even when the toolkit provides inaccurate output, our model might still be able to benefit from such output. Figure 4 shows such an example, where our system uses BERT+Dep using SCT and the baseline system is BERT without two-way attention. The sentence contains an ambiguity character bigram    , which has two possible interpretations,    AD ( immediately ) and   NN/  LC ( on the horse ). The second one is correct, yet the baseline tagger chooses the former because     ( immediately ) is a very common adverb. Although SCT also chooses the wrong segmentation and thus has an incorrect dependency structure, our system is still able to produce correct segmentation and POS tags. One plausible explanation for this is that the inaccurate dependency structure includes an advmod link between     ( immediately ) and    ( very good ). Because such a dependency pair seldom appears in the corpus, the attention from such knowledge is weak and hence encourages our system to choose the correct word segmentation and POS tags. There are basically two approaches to CWS and POS tagging: to perform POS tagging right after word segmentation in a pipeline, or to conduct the two tasks simultaneously, known as joint CWS and POS tagging. In the past two decades, many studies have shown that joint tagging outperforms the pipeline approach (Ng and Low, 2004; Jiang et al., 2008, 2009; Wang et al., 2011; Sun, 2011; Zeng et al., 2013). In recent years, neural methods started to play a dominant role for this task (Zheng et al., 2013; Kurita et al., 2017; Shao et al., 2017; Zhang et al., 2018), where some of them tried to incorporate extra knowledge in their studies. For example, Kurita et al. (2017) exploited to model n-grams to improve the task; Shao et al. (2017) extended the idea by incorporating pre-trained n-gram embeddings, as well as radical embeddings, into character representations. Zhang et al. (2018) tried to leverage the knowledge from character embeddings, trained on an automatically tagged corpus by a baseline tagger. Compared to these previous studies, TWASP provides a simple, yet effective, neural model for joint tagging, without requiring a complicated mechanism of incorporating different features or pre-processing a corpus. In this paper, we propose neural approach with a two-way attention mechanism to incorporate auto-analyzed knowledge for joint CWS and POS tagging, following a character-based sequence labeling paradigm. Our proposed attention module learns and weights context features and their corresponding knowledge instances in two separate ways, and use the combined attentions from the two ways to enhance the joint tagging. Experimental results on five benchmark datasets illustrate the validity and effectiveness of our model, where the two-way attentions can be integrated with different encoders and provide consistent improvements over baseline taggers. Our model achieves state-of-the-art performance on all the datasets. Overall, this work presents an elegant way to use auto-analyzed knowledge and enhance neural models with existing NLP tools. For future work, we plan to apply the same methodology to other NLP tasks. Xiang Ao was partially supported by the National Natural Science Foundation of China under Grant No. 61976204, U1811461, the Natural Science Foundation of Chongqing under Grant No. cstc2019jcyj-msxmX0149 and the Project of Youth Innovation Promotion Association CAS.
abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain method abstain abstain abstain method abstain abstain abstain method abstain abstain method abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain other method abstain abstain abstain abstain abstain other abstain result abstain abstain abstain abstain abstain result abstain abstain abstain result abstain abstain abstain result abstain abstain abstain other other abstain other abstain other abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain result other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain method method other abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain method method abstain abstain abstain method abstain method other other other other other other objective objective result result method method other other