home Forums # Technical Support Explain this fcl file in details

Viewing 2 posts - 1 through 2 (of 2 total)
• Author
Posts
• #1937
Unknown
Member

VAR_INPUT // Define input variables
sent_len : REAL;
term_fq : REAL;
them_wd :REAL;
END_VAR
VAR_OUTPUT // Define output variable
important : REAL;
END_VAR
FUZZIFY sent_len
TERM short := (0, 0) (0,1) (0.5, 0);
TERM normal := (0.14,0) (0.5, 1) (0.83, 0);
TERM long := (0.5, 0) (1,1) (1, 0);
END_FUZZIFY
FUZZIFY term_fq
TERM low := (0, 0) (0,1) (0.5, 0);
TERM high := (0.14,0) (0.5, 1) (0.83, 0);
TERM Vhigh := (0.5, 0) (1,1) (1, 0);
END_FUZZIFY
FUZZIFY them_wd // Fuzzify input variable ‘them_wd’: { ‘lessimp’, ‘moreimp’ }
TERM lessimp := 1.0;
TERM moreimp := 4.0;
END_FUZZIFY

DEFUZZIFY important
TERM cheap :=trian 0.75 1 1;
TERM average :=trian -1 -0.75 -0.5;
TERM generous :=trian 2 2.5 3;
METHOD : COG; // Use ‘Center Of Gravity’ defuzzification method
DEFAULT := 0; // Default value is 0 (if no rule activates defuzzifier)
END_DEFUZZIFY
RULEBLOCK No1
AND : MIN; // Use ‘min’ for ‘and’ (also implicit use ‘max’ for ‘or’ to fulfillDeMorgan’s Law)
ACT : MIN; // Use ‘min’ activation method
ACCU : MAX; // Use ‘max’ accumulation method
Rule 1: IF sent_len IS normal AND term_fq IS low AND them_wd IS lessimp THEN important IS cheap;
Rule 2: IF sent_len IS long AND term_fq IS high AND them_wd IS lessimp THEN important IS average;
Rule 3: IF sent_len IS short AND term_fq IS Vhigh AND them_wd IS moreimp THEN important IS generous;
Rule 4: IF sent_len IS short OR term_fq IS low OR them_wd IS lessimp THEN important IS cheap;
END_RULEBLOCK
END_FUNCTION_BLOCK

Please someone explain this file because I have seminar for summarization of text that used this file but I don’t know how it is implemented.

Experts please explain this file in details

#1947

Hi,

Please, play with QtFuzzyLite and observe how engines are exported to FCL.

Cheers.

Viewing 2 posts - 1 through 2 (of 2 total)
• You must be logged in to reply to this topic.