In NLP context, I am researching an efficient way to define a list of singles&combinations as point seperated representation for a string input like: 1 2 3 4 5 6 7 8 9. Whereby each position number is actually a word.
Imagine a sentence with 2 words:
I want.
Splitting this sentence results in 2 words, where the positions are I=1, want=2. The positions of possible singles&combinations are then:
1, 2, 1.2, 2.1, = 4 results
If the input is 3, then I got: 1, 2,3,1.2,1.3, 2.1, 2.3, 3.1, 3.2, 1.2.3, 1.3.2, 2.1.3, 2.3.1, 3.2.1, 3.1.2.= 15 results
I want to define a Java action which gives a list of singles/combinations for a string input like: 1 2 3 4 5 6 7 8 9. Which should be like a list of strings like:
1,2,...., 9.8.7.6.5.4.3.2.1
N-results
Seen some results differ then suggested factorials (3*2*1!=15) I think this is another formula.