From e15d908d11b86d78af3ccd1af0d9fceccbc00bdb Mon Sep 17 00:00:00 2001 From: riship Date: Tue, 10 Dec 2024 15:43:12 -0800 Subject: [PATCH] adding better chunking for txt2kg --- torch_geometric/nn/nlp/txt2kg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/torch_geometric/nn/nlp/txt2kg.py b/torch_geometric/nn/nlp/txt2kg.py index 4757462ab5cc..9bfd24e56a82 100644 --- a/torch_geometric/nn/nlp/txt2kg.py +++ b/torch_geometric/nn/nlp/txt2kg.py @@ -182,8 +182,9 @@ def get_num_procs(): def chunk_text(text: str, chunk_size: int = 512) -> list[str]: - """Function to chunk text into sentence-based segments. - Co-authored with Claude AI + """ + Function to chunk text into sentence-based segments. + Co-authored with Claude AI. """ # If the input text is empty or None, return an empty list if not text: