Lingonberry Giraffe: Lexically-Sound Beam Search for Explainable Translation of Compound Words (2025)

Abstract: We present a hybrid rule-based and neural method for translating Finnish compound words into English. We use a lightweight set of rules to split a Finnish word into its constituent parts and determine the possible translations of those words using a dictionary. We then use an NMT model to rank these alternatives to determine the final output. Since the number of translations that takes into account different spellings, inflections, and word separators can be very large, we use beam search for the ranking when the number of translations is over a threshold. We find that our method is an improvement over using the same NMT model for end-to-end translation in both automatic and human evaluation. We conclude that our method retains the good qualities of rule-based translation such as explainability and controllability while keeping the rules lightweight.

## introduction in this paper, we present a system for translating finnish compound nouns into english by using a hybrid rulebased and neural method that constructs a trie of possible translation alternatives in a rule-based manner and then selects the translation using beam search. unlike in mainstream machine translation research which focuses on sentences and longer texts, our system is instead intended to be used as a fall-back for a dictionary search, providing translations for individual words in case they are not found in the dictionary. this feature is important for languages such as finnish, swedish, and german that allow novel ad hoc compound words to be formed freely. these compounds are often long and difficult to parse, especially for non-native speakers, rendering traditional dictionary searches unusable for them. unfortunately, translating single finnish compound words into english using current state-of-the-art neural machine translation (nmt) can be quite vexing: at time of writing, the finnish word "puolukka-kinuskirahka" (lingonberry caramel quark) gets translated into en-glish as "lingonberry custard" and "lingonberry quinusgiraffe" by two popular commercial machine translation systems. these are mistakes no human translator would make, as the finnish word is unambiguously the compound of "puolukka" (lingonberry), "kinuski" (for which caramel is a reasonable translation, even though others can be argued for) and "rahka" (quark). we solve this issue of lexical selection by choosing the best translation given by the rule-based system by scoring the alternatives with an nmt model. since the number of alternatives can be very large (even hundreds of thousands in some cases), we implement a beam search for searching the space @xcite . we argue that our method combines the good qualities of rule-based translators such as explainability (each word in the translation can be linked back to a dictionary entry) with the versatility of neural methods, not requiring complex rulesets or algorithms for disambiguation. section 2 lists prior work with this problem. section 3 describes our novel methods. section 4 describes how we evaluated our system on four datasets: a list of food item names, two small forestry-related term banks, and a subset of iate. finally, section 5 discusses the next steps and the limitations of our work. ## background in this section, we describe analysis of finnish and english compound words and cover relevant prior work both in the fields of rule-based and neural machine translation. puolukka-kinuskirahka lingonberry caramel quark fromage blanc aux airelles et au caramel figure 1 : an example of compound words in three languages. the structure of the compound is similar for the head-final finnish and english, while the head-initial french has a reversed structure. furthermore, french uses gendered and numbered preposition constructions such as "au" and "aux" (a contraction of the plural article and "au", thus unambiguously referring to the plural "airelles") and conjunctions such as "et" to convey relationships between components that are left implicit in finnish compounds. while in this case the use of the dash makes it explicit that "puolukka" and "kinuski" are unrelated and have the same relationship to "rahka", the added specificity of languages that structure compounds like french cannot be easily deduced from the finnish or english compound. this makes translating finnish to english significantly easier than translating it to french. ## our method we present a pipeline for translating finnish compounds with a hybrid rule-based and neural approach. our pipeline has the following components: ## evaluation our main research question was: "is this system an improvement over using regular nmt translation for single-word expressions, either in translation quality or in time performance?" to measure the translation quality, we conducted a human evaluation of several compound word datasets translated by both our system and an nmt model decoded with a normal beam search. along with our human evaluation, we also report automated metrics that we find relevant. notably, we do not report bleu as our translation pairs are too short for it to be representative. we also measured the translation time for each of the translated expressions to estimate whether the system is practical. ## discussion in this section we discuss the implications of our research and take a look at the next steps and further research. ## conclusions in this paper, we presented a system for translating finnish compound nouns into english using a hybrid rule-based and neural approach. according to our automatic and human evaluation, our system performs better on average than the baseline nmt model on two of our four test sets and has the same performance on the other two test sets. unlike the nmt model, our system is explainable and controllable, allowing the user to see the dictionary entries the translation is based on, and to fix possible errors by simply modifying the glossary used for translation. while we limited our scope to a single language pair and only compound words, we see promise in our methods to be usable in many kinds of different hybrid rule-based and neural systems.