CBR Knowledge Base: car_diagnosis Attributes: brand, engine_noise, year, price, is_electric Total cases: 2 Similarity functions: brand(symbolic), year(linear), price(inv_dist) Output feature: solution_repair_cost $ reader cbr car_diagnosis.cbr --stats Output:
Case count: 2 Missing values: 0 Attribute 'brand': unique values [tesla, bmw] Price range: 32000.0 – 45000.0 $ reader cbr car_diagnosis.cbr --query "brand=tesla year=2021 price=40000" Output:
Here’s a full, technical write-up on — a command-line tool for inspecting and validating CBR (Case-Based Reasoning) knowledge bases, commonly used in expert systems and AI research. reader cbr – CBR Knowledge Base Inspection Tool 1. Overview reader cbr is a command-line utility designed to parse, validate, and display the contents of a CBR knowledge base file . It is primarily used in academic and research-oriented CBR systems (e.g., myCBR, jColibri, or legacy CBR shells). The tool helps developers and knowledge engineers verify case structure, attribute types, similarity measures, and retrieval performance directly from the terminal. 2. Syntax reader cbr [OPTIONS] <filename.cbr> 3. Input File Format ( .cbr ) The .cbr file typically follows a structured plain-text or XML-based format. Example structure:
DOMAIN: car-diagnosis ATTRIBUTES: - brand: symbolic - engine_noise: symbolic - year: integer - price: float - is_electric: boolean CASES: case1: brand=tesla, engine_noise=quiet, year=2022, price=45000.0, is_electric=true case2: brand=bmw, engine_noise=loud, year=2019, price=32000.0, is_electric=false
SIMILARITY: brand: euclidean_symbolic year: linear (max_diff=20) price: inverse_distance