Python Forum

Full Version: How to sort words to categories
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone Smile ,
This is my first question here, and I don't have much experience in programming and HTML.

I want that in an HTML form you put one or some more words and then these words will go to a python file. The python file would sort these words in to categorize.

Example:

You put the word water and then the python code would know it's the category food.

I think it can be done if you have a database with categories and words like these words are this category and then the code just look at which category this word is listed.

Now I want to know if this can be done with python or with other programming languages.

And have anybody other ideas how to sort words to categorize?

Thank you
Not at all trivial.

I think you should spend some time visiting Natural Language processing.
This is one of the most complicated areas of programming.

Start here:
Natural language Toolkit (NLTK): https://www.nltk.org/ Been around since 2001, and still in process.

And for tutorials:
Google: "Natural language processing tutorials python"

Scholarly Papers: https://scholar.google.com/scholar?q=Nat...i=scholart

Yes, it can be done, but would be a (long) University Level project