"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-06 23:16:27.639545
"""

```python
from typing import List, Dict
import re
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
import string


def preprocess_text(text: str) -> List[str]:
    """
    Preprocesses the input text by removing punctuation, converting to lowercase,
    and tokenizing.

    Args:
        text (str): The input text to be preprocessed.

    Returns:
        List[str]: A list of preprocessed words.
    """
    # Remove punctuation
    text = re.sub(r'[^\w\s]', '', text)
    # Convert to lowercase
    text = text.lower()
    # Tokenize the text
    tokens = word_tokenize(text)
    return [token for token in tokens if token not in stopwords.words('english') and token.isalpha()]


def extract_sentences(text: str) -> List[str]:
    """
    Extracts sentences from a given text.

    Args:
        text (str): The input text containing multiple sentences.

    Returns:
        List[str]: A list of extracted sentences.
    """
    return re.split(r'(?<=[.!?])\s+', text)


def fact_check(fact: str, knowledge_base: Dict[str, bool]) -> bool:
    """
    Checks the validity of a given fact against a knowledge base.

    Args:
        fact (str): The statement to be checked.
        knowledge_base (Dict[str, bool]): A dictionary containing known facts and their truth values.

    Returns:
        bool: True if the fact is considered true according to the knowledge base, False otherwise.
    """
    return knowledge_base.get(fact.lower(), False)


def create_fact_checker(text: str) -> bool:
    """
    Creates a simple fact checker that preprocesses text, extracts sentences,
    and checks each sentence against a predefined knowledge base.

    Args:
        text (str): A string containing multiple sentences to be checked as facts.

    Returns:
        bool: True if at least one sentence is considered true according to the knowledge base, False otherwise.
    """
    # Preprocess the input text
    preprocessed_sentences = [preprocess_text(sentence) for sentence in extract_sentences(text)]
    
    # Simulate a knowledge base with some predefined facts
    knowledge_base = {
        "the capital of france is paris": True,
        "the moon orbits around earth": True,
        "water boils at 100 degrees celsius": True,
        "pythagoras theorem states that in a right angled triangle, the square of the hypotenuse equals the sum of squares of other two sides": True
    }
    
    # Check each sentence against the knowledge base
    for sentence_tokens in preprocessed_sentences:
        for token in sentence_tokens:
            if fact_check(token, knowledge_base):
                return True
    
    return False


# Example usage
example_text = "The capital of France is Paris and it is located in Europe. The moon orbits around Earth, but does the sun?"
print(create_fact_checker(example_text))  # Expected output: True
```