Skip to content

Commit

Permalink
remove replaceMeMy
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychhsu committed Feb 22, 2019
1 parent 0722348 commit 429f12c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/i18n/traditional-chinese.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,6 @@
// See COPYING for details
"use strict";

function replaceMeMy(sentence) {
sentence = sentence.replace(/\b((?!(?:通知|告知)\b)[a-zA-Z0-9]+) me\b/g, '$1 他們');

return sentence.replace(/\b(我|我的)\b/g, (what) => {
switch(what) {
case '我':
return '他';
case '我的':
return '他們的';
default:
return what;
}
});
}

function postprocessSynthetic(sentence, program) {
if (program.isProgram && program.principal !== null)
sentence = replaceMeMy(sentence);

return sentence.replace(/ (新的|新) (他們的|我的|一個) /, (_new, what) => ` ${what} ${_new} `)
.trim();
}

const ARGUMENT_NAME_OVERRIDES = {};

const IGNORABLE_TOKENS = {
Expand Down Expand Up @@ -77,7 +54,6 @@ function isValidParaphrasePair(word, paraphrase) {
}

module.exports = {
postprocessSynthetic,
detokenize,

ARGUMENT_NAME_OVERRIDES,
Expand Down

0 comments on commit 429f12c

Please sign in to comment.