[docs]    def get_type(self, type: str) -> str:
        """
        Retrieves the simplified schema type for a given original type.
        Args:
            type (str): The original schema type to find the simplified type for.
        Returns:
            str: The simplified schema type if it exists;
                 otherwise, returns the original type.
        """
        try:
            return self.schema[type]
        except KeyError:
            return type
[docs]class DiffbotGraphTransformer:
    """Transforms documents into graph documents using Diffbot's NLP API.
    A graph document transformation system takes a sequence of Documents and returns a
    sequence of Graph Documents.
    Example:
        .. code-block:: python
            class DiffbotGraphTransformer(BaseGraphDocumentTransformer):
                def transform_documents(
                    self, documents: Sequence[Document], **kwargs: Any
                ) -> Sequence[GraphDocument]:
                    results = []
                    for document in documents:
                        raw_results = self.nlp_request(document.page_content)
                        graph_document = self.process_response(raw_results, document)
                        results.append(graph_document)
                    return results
                async def atransform_documents(
                    self, documents: Sequence[Document], **kwargs: Any
                ) -> Sequence[Document]:
                    raise NotImplementedError
    """
[docs]    def __init__(
        self,
        diffbot_api_key: Optional[str] = None,
        fact_confidence_threshold: float = 0.7,
        include_qualifiers: bool = True,
        include_evidence: bool = True,
        simplified_schema: bool = True,
    ) -> None:
        """
        Initialize the graph transformer with various options.
        Args:
            diffbot_api_key (str):