a hash containing - which words are contained in a paragraph another hash containing - which paragraphs contains which words.
As worded, both those hashes contain the same information? Please clarify.
Also, how many paras (not lines, or GB)? And how many (key)words?
Finding the optimal solution is NP-hard--brute force is essentially the only way. But there are some efficient mechanisms for testing permutations; and others that can help prune the search space; but we need to know the scale of the parameters.
In reply to Re^4: Help required in optimizing the output (PERL)
by BrowserUk
in thread Help required in optimizing the output (PERL)
by randomid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |