3
$\begingroup$

Recently, I asked for some assistance on word formation. The respondent provided me with the Qat website which was perfect. I have another question.

I would like to generate a list of words where two smaller words form a larger word. For example, adding SHIP to FRIEND, LORD, and WAR creates the words FRIENDSHIP, LORDSHIP, and WARSHIP.

$\endgroup$

1 Answer 1

4
$\begingroup$

In Qat this is A;B;AB:

  • A is a string of letters which must be a word
  • B is a string of letters which must be a word
  • AB (those two concatenated) is a string of letters which must be a word

If you would like to force longer words, simply add length constraints, e.g. A;B;AB;|A|=4-;|B|=2-

$\endgroup$
2
  • $\begingroup$ Your coding generated the list but at first glance, it wasn't a perfect solution. But then I alphabetically sorted the second word to group them and it gave me the result that I sought. Thank you! $\endgroup$ Mar 26, 2022 at 20:59
  • 1
    $\begingroup$ The fun ones are those were the meanings change, and of the longer word combinations I really like troubles+hooting and pronoun+cements. $\endgroup$ May 3, 2022 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.