Need to organize words based on their components, any other way aside from brute force?
- by Lathan
I'm not sure if this process has a name.
I have some words (about 9,000). They are in Japanese, but I'll try to explain this using English words. I want to categorize the words by the components (in English, letters).
A
B
C
act bar play
This should create:
A: play
B: bar
C: act
Now, 'a' appears in all 3 words, but I want to make sure that each category (letter) has at least word. Now, it would make sense to delete a word after it's used, but there are a few cases where 2 letters make up one word and that's each letter's only word--so I'd like to account for that somehow.
Is there an approach for solving this aside from brute force? Dynamic programming perhaps? Even a name for this process (if it exists) would be great.