Skip to content

Commit

Permalink
support chinese sentence segmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kasumi-1 committed Jan 5, 2024
1 parent a03cb29 commit bf6e575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/processResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function processResponse({

// Cut out and process the response sentence by sentence
const sentenceMatch = receivedMessage.match(
/^(.+[\.\!\?\n]|.{10,}[,])/,
/^(.+[\.\\!\!\?\?\,\n]|.{10,}[,])/,
);
if (sentenceMatch && sentenceMatch[0]) {
const sentence = sentenceMatch[0];
Expand Down

0 comments on commit bf6e575

Please sign in to comment.