Skip to content

Fix missing space at text concatenation boundaries#81

Open
sniper-noob wants to merge 1 commit into
It-s-AI:mainfrom
sniper-noob:fix/missing-space-text-concatenation
Open

Fix missing space at text concatenation boundaries#81
sniper-noob wants to merge 1 commit into
It-s-AI:mainfrom
sniper-noob:fix/missing-space-text-concatenation

Conversation

@sniper-noob
Copy link
Copy Markdown

When concatenating begin + generated_middle + end, no space separator was added. If begin doesn't end with whitespace and generated_middle doesn't start with one, words fuse together causing label misalignment.

Fix: Add explicit space separators between the three segments.

Example:
begin = "The quick brown fox"
generated_middle = "jumped over the lazy"
end = "dog in the park."

Before (BUG):
"The quick brown foxjumped over the lazydog in the park."
split() -> 10 words, but labels has 12 entries (4+5+3 from each part)

After (FIX):
"The quick brown fox jumped over the lazy dog in the park."
split() -> 12 words, matches labels exactly

When concatenating begin + generated_middle + end, no space separator
was added. If begin doesn't end with whitespace and generated_middle
doesn't start with one, words fuse together causing label misalignment.

Fix: Add explicit space separators between the three segments.

Example:
  begin = "The quick brown fox"
  generated_middle = "jumped over the lazy"
  end = "dog in the park."

  Before (BUG):
    "The quick brown foxjumped over the lazydog in the park."
    split() -> 10 words, but labels has 12 entries (4+5+3 from each part)

  After (FIX):
    "The quick brown fox jumped over the lazy dog in the park."
    split() -> 12 words, matches labels exactly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant