Categorizing Words and Category Values

前端 未结 21 1650
温柔的废话
温柔的废话 2021-01-31 05:49

We were set an algorithm problem in class today, as a \"if you figure out a solution you don\'t have to do this subject\". SO of course, we all thought we will give it a go.

21条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 06:40

    You could do a custom algorithm to work specifically on that data, for instance words ending in 'ing' are verbs (present participle) and could be sports.

    Create a set of categorization rules like the one above and see how high an accuracy you get.

    EDIT:

    Steal the wikipedia database (it's free anyway) and get the list of articles under each of your ten categories. Count the occurrences of each of your 100 words in all the articles under each category, and the category with the highest 'keyword density' of that word (e.g. fishing) wins.

提交回复
热议问题