diff --git a/BUILD.tf_dist b/BUILD.tf_dist index 3bda660..cec3a54 100644 --- a/BUILD.tf_dist +++ b/BUILD.tf_dist @@ -17,7 +17,8 @@ filegroup( filegroup( name="tf_mac_lib", srcs=glob( - ["lib/mac/*.o"] + ["lib/mac/*.o"], + exclude = ["lib/mac/__.SYMDEF_*.o"] ) ) cc_library( diff --git a/kcws/cc/sentence_breaker.cc b/kcws/cc/sentence_breaker.cc index d7590c3..10ef525 100755 --- a/kcws/cc/sentence_breaker.cc +++ b/kcws/cc/sentence_breaker.cc @@ -25,6 +25,8 @@ SentenceBreaker::SentenceBreaker(int maxLen) { BasicStringUtil::u8tou16(kInlineMarks[i], strlen(kInlineMarks[i]), ustr1); BasicStringUtil::u8tou16(kInlineMarks[i + 1], strlen(kInlineMarks[i + 1]), ustr2); inline_marks_.insert(std::make_pair(ustr1[0], ustr2[0])); + inline_marks_set_.insert(ustr1[0]); + inline_marks_set_.insert(ustr2[0]); } for (size_t i = 0; i < sizeof(kBreakMarks) / sizeof(char*); i++) { UnicodeStr ustr; diff --git a/kcws/cc/sentence_breaker.h b/kcws/cc/sentence_breaker.h index f601cf3..915d507 100755 --- a/kcws/cc/sentence_breaker.h +++ b/kcws/cc/sentence_breaker.h @@ -32,6 +32,7 @@ class SentenceBreaker { std::unordered_map inline_marks_; std::unordered_set break_marks_; + std::unordered_set inline_marks_set_; int max_len_; }; } // namespace kcws