- 题目
input : 'derekanderson'
output: ['derek', 'anderson']
【传统算法】
动态规划:仅考虑了词长
-
leetcode 139 https://leetcode-cn.com/problems/word-break/solution/dan-ci-chai-fen-by-leetcode/
-
leetcode 140 https://leetcode-cn.com/problems/word-break-ii/solution/dan-ci-fen-ge-ii-by-tangzixia/
动态规划升级版:考虑了词频和词长
- Word Ninja https://github.com/keredson/wordninja
【机器学习】
如果考虑使用机器学习,我们很容易想到这是一类序列标注问题,其中分词采用CRF+LSTM是一种较为主流的做法。