# Named Entity Correction in Neural Machine Translation Using the Attention Alignment Map
###### Abstract
In the decoding process, another LSTM cell also generates words character-by-character. [PERSON] and [PERSON] [25] proposed a hybrid word-character model. This model adopts a sub-LSTM layer to use the information at the character level when it finds _unknown_ words both in the encoding and decoding steps. Although character-based models show a translation quality comparable to word-based models and achieve open-vocabulary NMT, they require a huge amount of training time when compared with word-based models. This is because, if words are split into characters, their sequence lengths are increased to the number of characters, so the model complexity grows significantly. There are other approaches to use character-based models such as using convolutional neural networks [30; 31]. However, it is hard to directly apply fully character-based models to Korean, because a Korean character is made by combining consonants and a vowel. [PERSON] et al. [26] augmented a parallel corpus to allow NMT models to learn the alignments of \"UNK\" symbols between the input and output sentences. However, this method is difficult to apply to language pairs with extremely different structures, such as English-Chinese, English-Korean, and Chinese-to-Korean. [PERSON] [26] and [PERSON] [24] effectively addressed \"UNK\" symbols in translated sentence. However, mistranslated words, which often appear for rare input words, still were not considered. In this work, we propose a postprocessing method that corrects mistranslated named entities in the target language using a named entity recognition (NER) model and an attention alignment mapping (AAM) between an input and an output sentence by using the attention mechanism (to the best of our knowledge, first proposed by [PERSON] et al. [13]). The proposed method can be directly applied to pretrained NMT models that use an attention mechanism by appending the postprocessing step to its output, without retraining the existing NMT models or modifying the parallel corpus. Our experiments on the Chinese to-Korean translation task of historical documents, the _Annals of the Joseon Dynasty_ ([[http://sillok.history.go.kr/main/main.do](http://sillok.history.go.kr/main/main.do)]([http://sillok.history.go.kr/main/main.do](http://sillok.history.go.kr/main/main.do)), last access date: 1 July 2021) demonstrate that the proposed method is effective. In a numerical evaluation, the proposed method shows that the bilingual evaluation understudy (BLEU) score [32] was improved up to 3.70 compared to the baseline when the proposed method was not applied. Our work is available in a Git repository [[https://bitbucket.org/saraitne76/chn_nmt/src/master/](https://bitbucket.org/saraitne76/chn_nmt/src/master/)]([https://bitbucket.org/saraitne76/chn_nmt/src/master/](https://bitbucket.org/saraitne76/chn_nmt/src/master/)), last access date: 1 July 2021). The remainder of the paper is organized as follows: Section 2 provides a review of the conventional machine translation and NER methods that are related to the proposed method. The named entity matching using the attention alignment map that forms the core of the current study is introduced in Section 3, along with the implementation details of the transformer and the proposed NER algorithm. Section 4 describes a series of experiments