Skip to content

Commit

Permalink
fix sentence break and tf dist for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Koth committed Mar 4, 2017
1 parent 0fc14a9 commit b20fedb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BUILD.tf_dist
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions kcws/cc/sentence_breaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions kcws/cc/sentence_breaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SentenceBreaker {

std::unordered_map<UnicodeCharT, UnicodeCharT> inline_marks_;
std::unordered_set<UnicodeCharT> break_marks_;
std::unordered_set<UnicodeCharT> inline_marks_set_;
int max_len_;
};
} // namespace kcws
Expand Down

0 comments on commit b20fedb

Please sign in to comment.