"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-07 02:36:31.465985
"""

```python
from typing import List, Tuple
import re
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer

def preprocess_text(text: str) -> List[str]:
    """
    Preprocesses the text by removing non-alphanumeric characters, converting to lowercase,
    tokenizing, and removing stop words.
    
    :param text: A string containing the input text.
    :return: A list of preprocessed tokens.
    """
    # Remove non-alphanumeric characters
    cleaned_text = re.sub(r'\W', ' ', text)
    # Tokenize the text
    tokens = word_tokenize(cleaned_text.lower())
    # Remove stop words and lemmatize
    stop_words = set(stopwords.words('english'))
    lemmatizer = WordNetLemmatizer()
    return [lemmatizer.lemmatize(word) for word in tokens if word not in stop_words]

def check_fact(text: str, claims: List[str]) -> Tuple[List[bool], List[str]]:
    """
    Checks the truthfulness of given claims based on a provided text using simple keyword matching.
    
    :param text: A string containing the reference text to be used for fact-checking.
    :param claims: A list of strings representing the claims to be checked against the text.
    :return: A tuple with two elements:
             - A list of booleans indicating whether each claim is true (True) or false (False).
             - A list of explanations for why each claim was marked as true or false.
    """
    preprocessed_text = preprocess_text(text)
    results, explanations = [], []
    
    for claim in claims:
        preprocessed_claim = preprocess_text(claim)
        # Check if all keywords from the claim are present in the text
        is_true = all(word in preprocessed_text for word in preprocessed_claim)
        
        if is_true:
            explanation = f"Claim '{claim}' contains words found in the reference text."
        else:
            explanation = f"Claim '{claim}' does not contain enough words from the reference text to be considered true."
        
        results.append(is_true)
        explanations.append(explanation)
    
    return results, explanations

# Example usage
if __name__ == "__main__":
    reference_text = "The quick brown fox jumps over the lazy dog. Dogs are mammals and they have four legs."
    claims = [
        "Dogs are animals.",
        "Foxes can fly.",
        "Mammals are a type of animal.",
        "Cats are quadrupeds."
    ]
    
    results, explanations = check_fact(reference_text, claims)
    for claim, is_true, explanation in zip(claims, results, explanations):
        print(f"Claim: {claim}\nIs True: {is_true}\nExplanation: {explanation}\n")
```

This code defines a `fact_checker` capability that preprocesses text and claims using natural language processing techniques before checking the truthfulness of claims based on keyword matching. The example usage demonstrates how to use this function with a sample reference text and claims, providing results along with explanations for each claim's evaluation.