Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Separate parts of a compound word
gives a list of ways wd can be split into two complete words.
gives a list of ways wd can be split into two complete words of min characters or more. min should be a positive integer.
Split a compound word into its two parts:
If there are multiple ways to split wd into two valid words, then all are given:
The input wd does not have to be a known word:
Capitalization is preserved:
In languages like German, where the second part of the compound may be capitalized differently from the dictionary entry, a match is still found and the results preserve the capitalization of wd:
Select a language other than English:
The minimum string length of the two parts of the compound is set to 3 by default, but you can change this with the optional second argument:
Sometimes words that are not compounds get divided:
In some languages, the parts of compounds differ from the original words. In this example, the two parts of the compound are "Schwein" and "Hund", but there is an "e" between them. WordCompounds will not find the match in these cases:
This work is licensed under a Creative Commons Attribution 4.0 International License