Lexical Tools

SPT - Recursive Permutation Design

I. Introduction
This section describes the method to find all permutations with synonyms from pattern permutation results, recursively.

II. Algorithm

  • Get the recursive level
  • Put inTerm into inTerms
  • Go through all recursive levels
    • go through all inTerms
      • Get synonyms from permutation results
      • Add synonyms permutations to accumulated results
    • Set inTerms to synonyms permutations

III. Java Classes & Method

  • Spt.java: a Java class for finding all permutation
  • public Vector<String> GetSynonymPermutationRecursive( )

IV. Examples

  • Inputs:
    • inTerm: dog
    • recursive level: 2

  • Algorithm:

    Recursive levelPattern (word|synonyms)
    1dog|canine|k9|bull dog|
    2bull|
    dog|canine|k9|bull dog|

  • Outputs:
    • dog
    • canine
    • k9
    • bull dog
    • bull canine
    • bull k9
    • bull bull dog