3 ms·
You wouldn’t even be able to solve this in the standard leetcode DP problem way, because it’s ambiguous if all you know is which words are valid. For example TH
by School-Cotton 3y ago
You wouldn’t even be able to solve this in the standard leetcode DP problem way, because it’s ambiguous if all you know is which words are valid. For example THESEA could be either “THE SEA” or “THESE A”. You need to have a model of English grammar to realize that the former is much more likely to be part of a valid sentence than the latter.
- eutectic 3y agoI think even a bigram model would provide enough information.
- Y_Y 3y agoIs that "big-ram" or "bi-gram"?
- somebodythere 3y agoBi-gram aka pairs of words
- esafak 3y agoI think it was a rhetorical question.
- waveBidder 3y agoit's big RAM now! (a bi-gram is the probability of a word given the previous 2.