Skip to content

Commit

Permalink
Removed 的 as a suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
andreihar committed Jun 23, 2024
1 parent cab0062 commit aa28c81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions taibun/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class Converter {
get: (target, property) => {
let value = target[property];
if (!value) return value;

if (dialect === 'south') {
return value;
} else {
Expand Down Expand Up @@ -603,7 +602,7 @@ class Tokeniser {
const splitBySpaces = splitByPunctuation.flatMap(subword => subword.split(" "));
return splitBySpaces.flatMap(word => {
if (!word) return [];
const endsWithSpecialChar = (word.endsWith('的') || word.endsWith('矣')) && word.length > 1;
const endsWithSpecialChar = word.endsWith('矣') && word.length > 1;
return endsWithSpecialChar ? [word.slice(0, -1), word.slice(-1)] : [word];
});
});
Expand Down

0 comments on commit aa28c81

Please sign in to comment.