"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-06 23:17:01.335876
"""

```python
from typing import List, Optional


class FactChecker:
    """
    A simple fact checker that evaluates statements based on a predefined set of rules.
    """

    def __init__(self, rules: List[dict]):
        """
        Initialize the FactChecker with a list of rule dictionaries.

        :param rules: List of rules as dictionaries where each dictionary contains
                      'condition': function or string for comparison,
                      'result': boolean value if condition is met.
        """
        self.rules = rules

    def check(self, statement: str) -> Optional[bool]:
        """
        Check the given statement against all predefined rules.

        :param statement: The statement to be checked as a string.
        :return: True if any rule's condition matches and result is True,
                 False if no rule's condition matches or result is False,
                 None if no rules are provided or match.
        """
        for rule in self.rules:
            condition = rule.get('condition')
            expected_result = rule.get('result')

            try:
                # Evaluate the condition
                if callable(condition):
                    condition_result = condition(statement)
                else:
                    condition_result = eval(f"{statement} {condition}")

                # Check against the result
                if condition_result == expected_result:
                    return True
            except Exception as e:
                print(f"Error evaluating rule: {e}")
        
        return None


# Example usage
def is_positive_number(statement: str) -> bool:
    """
    Returns true if the statement can be evaluated to a positive number.
    """
    try:
        value = eval(statement)
        return value > 0 and isinstance(value, (int, float))
    except Exception:
        return False


def is_string_length(statement: str) -> bool:
    """
    Returns True if the string length of the statement is greater than 5.
    """
    return len(statement) > 5


rules = [
    {'condition': is_positive_number, 'result': True},
    {'condition': 'len(statement)', 'result': True},
]

fact_checker = FactChecker(rules)
print(fact_checker.check('3 + 2'))  # Should print: True
print(fact_checker.check('hello world'))  # Should print: False
```