Regex : how to get words from a string (C#)

后端 未结 6 663
半阙折子戏
半阙折子戏 2020-12-02 21:40

My input consists of user-posted strings.

What I want to do is create a dictionary with words, and how often they’ve been used. This means I want to parse a string,

6条回答
  •  被撕碎了的回忆
    2020-12-02 22:19

    You should look into Natural Language Processing (NLP), not regular expressions, and if you are targeting more than one spoken language, you need to factor that in as well. Since you're using C#, check out the SharpNLP project.

    Edit: This approach is only necessary if you care about the semantic content of the words you're trying to split up.

提交回复
热议问题