Python Forum
How to sort words to categories - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: How to sort words to categories (/thread-33209.html)



How to sort words to categories - Ayran - Apr-06-2021

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


RE: How to sort words to categories - Larz60+ - Apr-06-2021

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=Natural+language+processing+tutorials+python&hl=en&as_sdt=0&as_vis=1&oi=scholart

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