How to find and count emoticons in a string using python?

前端 未结 3 1614
难免孤独
难免孤独 2020-12-02 00:12

This topic has been addressed for text based emoticons at link1, link2, link3. However, I would like to do something slightly different than matching simple emoticons. I\'m

3条回答
  •  旧时难觅i
    2020-12-02 00:43

    My solution includes the emoji and regex modules. The regex module supports recognizing grapheme clusters (sequences of Unicode codepoints rendered as a single character), so we can count emojis like

提交回复
热议问题