Skip to content

Commit

Permalink
Merge branch 'txt2kg' of https://github.com/pyg-team/pytorch_geometric
Browse files Browse the repository at this point in the history
…into txt2kg
  • Loading branch information
puririshi98 committed Nov 15, 2024
2 parents bee3e91 + c060a10 commit e561f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_geometric/nn/nlp/txt2kg.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def add_doc_2_KG(
def get_chunks(s, maxlength):
start = 0
end = 0
while start + maxlength < len(s) and end != -1:
while start + maxlength < len(s) and end != -1:
end = s.rfind(" ", start, start + maxlength + 1)
yield s[start:end]
start = end +1
start = end + 1
yield s[start:]

0 comments on commit e561f3f

Please sign in to comment.