finite-logic
Version:
Perform fuzzy logic using linguistic values
17 lines (15 loc) • 358 B
JavaScript
const {
wrong,
some,
most,
right,
and,
or,
not,
compare,
toLabel
} = require('./index');
console.log("AND:", toLabel(and(most, some))); // some are right
console.log("OR:", toLabel(or(wrong, right))); // right
console.log("NOT:", toLabel(not(some))); // most are right
console.log("COMPARE:", compare(most, wrong)); // 0.7