"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-06 15:35:20.865165
"""

```python
import re
from typing import List, Tuple

def create_fact_checker(text: str) -> Tuple[List[str], List[Tuple[str, str]]]:
    """
    This function takes a string of text and returns a tuple containing:
    1. A list of sentences that are potentially factually incorrect.
    2. A list of tuples where each tuple contains the erroneous sentence and the detected error type.

    Args:
        text (str): The input text to check for factual errors.

    Returns:
        Tuple[List[str], List[Tuple[str, str]]]: 
            - First element: List of sentences that are potentially factually incorrect.
            - Second element: List of tuples with each tuple containing the sentence and error type.
    
    Example usage:
    >>> create_fact_checker("The Earth revolves around the Sun. The Moon is a star.")
    (['The Moon is a star.'], [('The Moon is a star.', 'astronomical_error')])
    """
    # Define some known facts
    known_facts = {
        "Earth": {"revolves around": "Sun"},
        "Moon": {"is not": "a star"}
    }

    sentences = re.split(r'[.!?]', text)
    errors = []

    for sentence in sentences:
        words = sentence.strip().split()
        found_error = False
        error_type = None

        # Check each word against known facts
        for i, word in enumerate(words):
            if word.lower() in known_facts.keys():
                fact = known_facts[word.lower()]
                for key in fact.keys():
                    if key in words[i + 1:]:
                        found_error = True
                        error_type = 'astronomical_error'
                        break

        if found_error:
            errors.append((sentence, error_type))

    potentially_incorrect_sentences, _ = zip(*errors)
    return list(potentially_incorrect_sentences), errors


# Example usage
if __name__ == "__main__":
    example_text = "The Earth revolves around the Sun. The Moon is a star."
    incorrect_sentences, detailed_errors = create_fact_checker(example_text)
    print("Incorrect sentences:", incorrect_sentences)
    for sentence, error_type in detailed_errors:
        print(f"Error in: {sentence} - Error type: {error_type}")
```

This code defines a `create_fact_checker` function that takes a string of text and returns potential factual errors along with their types. It uses simple keyword matching to detect errors against predefined known facts.