Skip to content

FllExporter

FllExporter

Bases: Exporter

Export an engine and its components to the FuzzyLite Language.

related

Attributes

indent instance-attribute

indent = indent

separator instance-attribute

separator = separator

Functions

__init__

__init__(indent: str = '  ', separator: str = '\n') -> None

Constructor.

Parameters:

Name Type Description Default
indent str

indentation of the FuzzyLite Language.

' '
separator str

separation between components of the FuzzyLite Language.

'\n'

activation

activation(activation: Activation | None) -> str

Return the activation method in the FuzzyLite Language.

Parameters:

Name Type Description Default
activation Activation | None

activation method to export

required

Returns:

Type Description
str

activation method in the FuzzyLite Language

defuzzifier

defuzzifier(defuzzifier: Defuzzifier | None) -> str

Return the defuzzifier in the FuzzyLite Language.

Parameters:

Name Type Description Default
defuzzifier Defuzzifier | None

defuzzifier to export

required

Returns:

Type Description
str

defuzzifier in the FuzzyLite Language

engine

engine(engine: Engine) -> str

Return the engine in the FuzzyLite Language.

Parameters:

Name Type Description Default
engine Engine

engine to export

required

Returns:

Type Description
str

engine in the FuzzyLite Language

format

format(key: str | None, value: Any) -> str

Format the arguments according to the FuzzyLite Language.

formatting table
value formatted
None none
bool true, false
float 0.999 using fuzzylite.library.Settings.decimals
list|set|tuple space-separated values, each formatted with this method
object anything else uses the object's __str__() method

Parameters:

Name Type Description Default
key str | None

name of the property

required
value Any

value to format

required

Returns:

Type Description
str

formatted (key and) value according to the FuzzyLite Language

input_variable

input_variable(variable: InputVariable) -> str

Return the input variable in the FuzzyLite Language.

Parameters:

Name Type Description Default
variable InputVariable

input variable to export

required

Returns: input variable in the FuzzyLite Language

norm

norm(norm: Norm | None) -> str

Return the norm in the FuzzyLite Language.

Parameters:

Name Type Description Default
norm Norm | None

norm to export

required

Returns:

Type Description
str

norm in the FuzzyLite Language

output_variable

output_variable(variable: OutputVariable) -> str

Return the output variable in the FuzzyLite Language.

Parameters:

Name Type Description Default
variable OutputVariable

output variable to export

required

Returns:

Type Description
str

output variable in the FuzzyLite Language

rule

rule(rule: Rule) -> str

Return the rule in the FuzzyLite Language.

Parameters:

Name Type Description Default
rule Rule

rule to export

required

Returns:

Type Description
str

rule in the FuzzyLite Language

rule_block

rule_block(rule_block: RuleBlock) -> str

Return the rule block in the FuzzyLite Language.

Parameters:

Name Type Description Default
rule_block RuleBlock

rule block to export

required

Returns:

Type Description
str

rule block in the FuzzyLite Language

term

term(term: Term) -> str

Return the term in the FuzzyLite Language.

Parameters:

Name Type Description Default
term Term

term to export

required

Returns:

Type Description
str

term in the FuzzyLite Language

to_string

to_string(instance: Any) -> str

Return the object in the FuzzyLite Language.

Parameters:

Name Type Description Default
instance Any

fuzzylite object.

required

Returns:

Type Description
str

object in the FuzzyLite Language.

variable

variable(variable: Variable, /, terms: bool = True) -> str

Return the variable in the FuzzyLite Language.

Parameters:

Name Type Description Default
variable Variable

variable to export

required
terms bool

whether to export the terms

True

Returns:

Type Description
str

variable in the FuzzyLite Language