# US 2026/0093919 A1 · End of sentence detection with sentence length-based penalty and grammatical voice-based data augmentation and inference time token merging

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0093919 A1
- Document ID: US20260093919A1
- Status: Published application
- Kind: A1
- Application number: 19/047,106
- Filed: 2025-02-06
- Published: 2026-04-02
- Earliest claimed: 2024-09-27
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Saket Gurukar; Eduardo Rivas Posada; Yoshio Josue Rubio Higuera; Asim Kadav
- Web page: https://patentgrep.com/patent/US20260093919A1

## CPC

- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/30: Semantic analysis
- G06F 40/58: Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes receiving a first sequence of text comprising a part of a sentence, providing the first sequence of text to a first artificial intelligence (AI) model to obtain an output, and predicting an end-of-sentence (EOS) based on the output. The method includes determining, based on the predicted EOS if the first sequence of text comprises a complete sentence, responsive to determining that the first sequence of text comprises the complete sentence, providing text within the first sequence of text comprising the complete sentence as an input to a second AI model and responsive to determining that the first sequence of text does not comprise the complete sentence, receiving a second sequence of text. The first AI model is optimized based on a sentence length-based loss function.

## Claims

### Claim 1

A method, comprising:
receiving a first sequence of text comprising a part of a sentence;
providing the first sequence of text to a first artificial intelligence (AI) model to obtain an output, and predicting an end-of-sentence (EOS) based on the output;
determining, based on the predicted EOS if the first sequence of text comprises a complete sentence;
responsive to determining that the first sequence of text comprises the complete sentence, providing text within the first sequence of text comprising the complete sentence as an input to a second AI model; and
responsive to determining that the first sequence of text does not comprise the complete sentence, receiving a second sequence of text,
wherein the first AI model is optimized based on a sentence length-based loss function.

### Claim 2 (depends on 1)

The method of claim 1, further comprising predicting an EOS token for the sentence.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first AI model is trained on an LLM augmented data set comprising active and passive voice expressions of equivalent statements.

### Claim 4 (depends on 1)

The method of claim 1, further comprising performing an n-gram based token merging to maintain one or more sentence semantics within at least one of the first sequence of text or the second sequence of text.

### Claim 5 (depends on 1)

The method of claim 1, wherein:
the first sequence of text is in a first language; and
the output of the second AI model comprises a translation of the complete sentence in a second language generated by an on-device large language model implemented at one of:
a television;
a smartphone;
an extended reality (XR) headset; or
digital home assistant.

### Claim 6 (depends on 1)

The method of claim 1, wherein the sentence length-based loss function comprises a regularization factor based on a position of each character within a sequence of text and that applies a penalty for EOS predictions which increases based on a distance of the character from a ground truth value for the EOS.

### Claim 7 (depends on 6)

The method of claim 6, wherein the sentence length-based loss function is given by:
λ
i
,
j
=
{
if
⁢
x
i
,
j
≠
N
j
-
1
N
j
-
x
i
,
j
else
0
y
_
i
,
j
=
{
if
⁢
y
^
i
,
j
>
y
th
1
else
0
L
EOS
(
i
,
j
)
=
L
BCE
(
i
,
j
)
=
+
α
*
λ
i
,
j
*
XOR
⁡
(
y
i
,
j
,
y
_
i
,
j
)
wherein j denotes a current sentence, I denotes a current character, Nj denotes a length of a j-th sentence, xi,j denotes a current i-th character's index of the j-th sentence in {0, 1, . . . , Nj−1}, y denotes a ground truth {0,1} regarding a presence of an end of a sentence, ŷi,j denotes an end of sentence prediction output by the first AI model, yth denotes a threshold value separating positive and null EOS predictions, BCE denotes a value of a binary cross-entropy loss function, and a is a hyperparameter multiplying a regularization term.

### Claim 8

An electronic device, comprising:
a memory; and
at least one processor configured to:
receive a first sequence of text comprising a part of a sentence;
provide the first sequence of text to a first artificial intelligence (AI) model to obtain an output, and predicting an end-of-sentence (EOS) based on the output;
determine, based on the predicted EOS if the first sequence of text comprises a complete sentence;
responsive to determining that the first sequence of text comprises the complete sentence, provide text within the first sequence of text comprising the complete sentence as an input to a second AI model; and
responsive to determining that the first sequence of text does not comprise the complete sentence, receive a second sequence of text,
wherein the first AI model is optimized based on a sentence length-based loss function.

### Claim 9 (depends on 8)

The electronic device of claim 8, wherein the at least one processor is further configured to predict an EOS token for the sentence.

### Claim 10 (depends on 8)

The electronic device of claim 8, wherein the first AI model is trained on an LLM augmented data set comprising active and passive voice expressions of equivalent statements.

### Claim 11 (depends on 8)

The electronic device of claim 8, wherein the at least one processor is further configured to perform an n-gram based token merging to maintain one or more sentence semantics within at least one of the first sequence of text or the second sequence of text.

### Claim 12 (depends on 8)

The electronic device of claim 8, wherein:
the first sequence of text is in a first language; and
the output of the second AI model comprises a translation of the complete sentence in a second language generated by an on-device large language model implemented at one of:
a television;
a smartphone;
an extended reality (XR) headset; or
digital home assistant.

### Claim 13 (depends on 8)

The electronic device of claim 8, wherein the sentence length-based loss function comprises a regularization factor based on a position of each character within a sequence of text and that applies a penalty for EOS predictions which increases based on a distance of the character from a ground truth value for the EOS.

### Claim 14 (depends on 13)

The electronic device of claim 13, wherein the sentence length-based loss function is given by:
λ
i
,
j
=
{
if
⁢
x
i
,
j
≠
N
j
-
1
N
j
-
x
i
,
j
else
0
y
_
i
,
j
=
{
if
⁢
y
^
i
,
j
>
y
th
1
else
0
L
EOS
(
i
,
j
)
=
L
BCE
(
i
,
j
)
=
+
α
*
λ
i
,
j
*
XOR
⁡
(
y
i
,
j
,
y
_
i
,
j
)
wherein j denotes a current sentence, I denotes a current character, Nj denotes a length of a j-th sentence, xi,j denotes a current i-th character's index of the j-th sentence in {0, 1, . . . , Nj−1}, y denotes a ground truth {0,1} regarding a presence of an end of a sentence, ŷi,j denotes an end of sentence prediction output by the first AI model, yth denotes a threshold value separating positive and null EOS predictions, BCE denotes a value of a binary cross-entropy loss function, and a is a hyperparameter multiplying a regularization term.

### Claim 15

A non-transitory computer-readable medium including instructions, which, when executed by at least one processor, cause an electronic device to:
receive a first sequence of text comprising a part of a sentence;
provide the first sequence of text to a first artificial intelligence (AI) model to obtain an output, and predicting an end-of-sentence (EOS) based on the output;
determine, based on the predicted EOS if the first sequence of text comprises a complete sentence;
responsive to determining that the first sequence of text comprises the complete sentence, provide text within the first sequence of text comprising the complete sentence as an input to a second AI model; and
responsive to determining that the first sequence of text does not comprise the complete sentence, receive a second sequence of text,
wherein the first AI model is optimized based on a sentence length-based loss function.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, further comprising instructions, which, when executed, cause the electronic device to predict an EOS token for the sentence.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the first AI model is trained on an LLM augmented data set comprising active and passive voice expressions of equivalent statements.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, further comprising instructions, that when executed, cause an electronic device to perform an n-gram based token merging to maintain one or more sentence semantics within at least one of: the first sequence of text or the second sequence of text.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein:
the first sequence of text is in a first language; and
the output of the second AI model comprises a translation of the complete sentence in a second language generated by an on-device large language model implemented at one of:
a television;
a smartphone;
an extended reality (XR) headset; or
digital home assistant.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the sentence length-based loss function comprises a regularization factor based on a position of each character within a sequence of text and that applies a penalty for EOS predictions which increases based on a distance of the character from a ground truth value for the EOS.
