PeterCxy / telegram-bot-language-chinese

Chinese language model for telegram-bot-coffee
1 stars 1 forks source link

The bot should be able to cut the text into multiple sentences and foreach feed to model. #3

Closed Artoria2e5 closed 9 years ago

Artoria2e5 commented 9 years ago

This can be achieved by doing multiple string.splits or a String.match, or simply checking the tag 'x' of the result.

Artoria2e5 commented 9 years ago

Additional considerations show that splitting -- which discards the deliminator is smarter.

Artoria2e5 commented 9 years ago

Here is a list of stuffs to split with.

You may want to check if the foreach j j is '' before you learn it.

For a better reference, refer to Google Pinyin for Android's symbols keypad.