ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine


12. 1
   ASPL Fuzzy Set Operations

 

The following are the fuzzy set operators

y&   yU   y\   yD   yP or their synonymous y*&   y*U   y*\   y*D   y*P

Fuzzy element intersection

      y&   a1 a2 [a3 .. aN]       where a1 a2 [a3 .. aN] are set variables

Fuzzy element union

      yU   a1 a2 [a3 .. aN]

Fuzzy element difference

      y\   a1 a2 [a3 .. aN]

Fuzzy element symmetric difference

      yD   a1 a2 [a3 .. aN]

Fuzzy element partition

      yP   a1 a2 [a3 .. aN]

ASPL Fuzzy Set Operations

●  ASPL Fuzzy Set Operations

Fuzzy matching is a match between two strings based on a measurement difference called Levenshtein distance. The distance is settable with the fuzzy command, and ASPL provides five set operators to do fuzzy set operations: y&, yU, y\, yD,yP and their corresponding synonymous y*&, y*U, y*\, y*D, y*P.

If the element names are likely to be similar, one can use the fuzzy set operations to group them according to their quantified linguistic distance.

 

■ The fuzzy Command

At the ASPL prompt when you type the command fuzzy the Levenshtein distance is printed as an integer.

You can set the fuzzy distance by typing fuzzy followed by the integer that represents that distance.

 

y& EXAMPLE
The following example shows how to get the fuzzy intersection between two datasets representing files in directories on the UNIX system.

 

y& OPERATION

aspl WS1
    (start ASPL loading the sample workspace WS1 )

①  aspl> y& a2 a3
    (print the intersetion between a2 a3 by fuzzy matching their elements)

②  aspl> fuzzy
    (display the fuzzy degree)

③  aspl> fuzzy 2
    (set fuzzy degree to 2)

④  aspl> y& a2 a3
    (print the intersetion between a2 a3 by fuzzy matching their elements)

⑤  aspl> uns
    (print the partition stack)

 

yU EXAMPLE
The following example shows how to get the fuzzy union between two datasets representing files in directories on the UNIX system.

 

yU OPERATION

aspl WS1
    (start ASPL loading the sample workspace WS1 )

①  aspl> yU a2 a3
    (print the fuzzy union of the elements in a2 and a3 )

②  aspl> fuzzy
    (display the fuzzy degree)

③  aspl> fuzzy 2
    (set fuzzy degree to 2)

④  aspl> yU a2 a3
    (print the fuzzy union of the elements in a2 and a3 )

⑤  aspl> uns
    (print the partition stack)

 

yP EXAMPLE
In this example we will compare the files in two directories using the partition operator and by fuzzy matching their file names (or their elements).

 

yP OPERATION

aspl WS1
    (start ASPL loading the sample workspace WS1 )

①  aspl> yP a1 a2
    (show the partition of the datasets in a1 and a2 by fuzzy matching their elements)

The yP is the same as y*P

②  aspl> y*P a1 a2
    (show the partition of the datasets in a1 and a2 by fuzzy matching their elements)

③  aspl> yP`mtm~ a1 a2
    (show the partition of the datasets in a1 and a2 by fuzzy matching their elements whose mtimes are different)

 

Operation Using Fuzzy Set Operators on UNIX Filesystem

The following example shows fuzzy operations performed in the sample workspace WS1.

viewme

 -TC- Display. 12.1.1   [Operation Using Fuzzy Set Operators on UNIX Filesystem]
Operation Using Fuzzy Set Operators on UNIX Filesystem

 

Operation Using Fuzzy Set Operators on Random-Bit Group

The following example shows fuzzy operations performed in the sample workspace RANDONEBIT.

viewme

 -TC- Display. 12.1.2   [Operation Using Fuzzy Set Operators on Random-Bit Group]
Operation Using Fuzzy Set Operators on Random-Bit