experimental: docstrings update (#18048)

Added missed docstrings. Formatted docsctrings to the consistent format.
This commit is contained in:
Leonid Ganeline
2024-02-23 18:24:16 -08:00
committed by GitHub
parent 56b955fc31
commit 3f6bf852ea
61 changed files with 316 additions and 102 deletions

View File

@@ -7,6 +7,8 @@ from langchain_core.documents import Document
def format_property_key(s: str) -> str:
"""Formats a string to be used as a property key."""
words = s.split()
if not words:
return s
@@ -16,8 +18,7 @@ def format_property_key(s: str) -> str:
class NodesList:
"""
Manages a list of nodes with associated properties.
"""List of nodes with associated properties.
Attributes:
nodes (Dict[Tuple, Any]): Stores nodes as keys and their properties as values.
@@ -85,8 +86,7 @@ schema_mapping = [
class SimplifiedSchema:
"""
Provides functionality for working with a simplified schema mapping.
"""Simplified schema mapping.
Attributes:
schema (Dict): A dictionary containing the mapping to simplified schema types.
@@ -116,7 +116,7 @@ class SimplifiedSchema:
class DiffbotGraphTransformer:
"""Transforms documents into graph documents using Diffbot's NLP API.
"""Transform documents into graph documents using Diffbot NLP API.
A graph document transformation system takes a sequence of Documents and returns a
sequence of Graph Documents.